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:22 AM
11: * To change this template use File | Settings | File Templates.
12: */
13: public class ConnectionProviderImpl1 implements ConnectionProvider {
14: public Connection getConnection() throws Exception {
15: Class.forName("oracle.jdbc.driver.OracleDriver");
16: return DriverManager
17: .getConnection(
18: "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=10.102.15.212)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=DEV)(INSTANCE_NAME=DEV1)))",
19: "sachin", "passw0rd");
20: }
21:
22: public void returnConnection(Connection conn) throws Exception {
23: conn.close();
24: }
25: }
|