Changeset 405 for branches/ds_pool/src/org/bridgedb/rdb/SimpleGdb.java
- Timestamp:
- 06/11/10 16:39:01 (2 years ago)
- Files:
-
- 1 modified
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
