Changeset 405
- Timestamp:
- 06/11/10 16:39:01 (20 months ago)
- Location:
- branches/ds_pool/src/org/bridgedb/rdb
- Files:
-
- 1 added
- 4 modified
-
JdbcConnectionPool.java (added)
-
SimpleGdb.java (modified) (4 diffs)
-
SimpleGdbFactory.java (modified) (1 diff)
-
SimpleGdbImpl2.java (modified) (1 diff)
-
SimpleGdbImpl3.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/ds_pool/src/org/bridgedb/rdb/SimpleGdb.java
r318 r405 53 53 public abstract class SimpleGdb extends IDMapperRdb 54 54 { 55 56 private JdbcConnectionPool pool; 57 58 55 59 private final String connectionString; 56 60 /** … … 62 66 this.connectionString = connectionString; 63 67 this.dbName = dbName; 68 69 try 70 { 71 // there's something a bit weird that this class does not know 72 // it's underlying driver... 73 String driverClassName = null; 74 pool = new JdbcConnectionPool(dbName, driverClassName, connectionString); 75 } 76 catch (IDMapperException e) 77 { 78 throw new RuntimeException(e); 79 } 64 80 } 65 81 … … 176 192 synchronized public Connection getConnection() throws SQLException 177 193 { 194 /* 178 195 // if singleConnection is true, each call to getConnection() will return the same object. 179 196 // if singleConnection is false, each call to getConneciton() will lead to a new connection object being created. … … 184 201 } 185 202 return con; 203 */ 204 return pool.getConnection(); 186 205 } 187 206 -
branches/ds_pool/src/org/bridgedb/rdb/SimpleGdbFactory.java
r326 r405 57 57 try 58 58 { 59 59 60 con = DriverManager.getConnection(connectionString); 60 61 stmt = con.createStatement(); -
branches/ds_pool/src/org/bridgedb/rdb/SimpleGdbImpl2.java
r318 r405 73 73 * A new instance of this class is created automatically. 74 74 * @param dbName The file containing the Gene Database. 75 * @param con An existing SQL Connector.75 * @param data_.con An existing SQL Connector. 76 76 * @param props PROP_RECREATE if you want to create a new database (possibly overwriting an existing one) 77 77 * or PROP_NONE if you want to connect read-only -
branches/ds_pool/src/org/bridgedb/rdb/SimpleGdbImpl3.java
r338 r405 37 37 * A new instance of this class is created automatically. 38 38 * @param dbName The file containing the Gene Database. 39 * @param con An existing java SQL connection39 * @param data_.con An existing java SQL connection 40 40 * @param props PROP_RECREATE if you want to create a new database (possibly overwriting an existing one) 41 41 * or PROP_NONE if you want to connect read-only
