01: package org.smartlib.pool.core;
02:
03: import java.sql.Connection;
04: import java.sql.DriverManager;
05:
06: /**
07: * Created by IntelliJ IDEA.
08: * User: kerneldebugger
09: * Date: Oct 2, 2005
10: * Time: 1:55:39 AM
11: * To change this template use File | Settings | File Templates.
12: */
13: public class ConnectionProviderImpl2 implements ConnectionProvider {
14:
15: public Connection getConnection() throws Exception {
16: Class.forName("oracle.jdbc.driver.OracleDriver");
17: return DriverManager
18: .getConnection(
19: "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=10.102.15.213)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=DEV)(INSTANCE_NAME=DEV2)))",
20: "sachin", "passw0rd");
21: }
22:
23: public void returnConnection(Connection conn) throws Exception {
24: conn.close();
25: }
26:
27: }
|