aspose file tools
The moose likes JDBC and the fly likes Need some good connection pool Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Need some good connection pool" Watch "Need some good connection pool" New topic
Author

Need some good connection pool

prashant parab
Greenhorn

Joined: Jan 10, 2002
Posts: 17
Hi all,
I am planning to use some good connection pool class in my project. I am interested in pooling capability as well as statement caching capability of the pool. I am thinking of using the pool class provided by oracle thin driver (OracleConnectionCacheImpl.class).

Sample code
------------

OracleConnectionPoolDataSource ocpds = new OracleConnectionPoolDataSource();

ocpds.setURL(dbprop.getProperty("url"));
ocpds.setUser(dbprop.getProperty("user"));
ocpds.setPassword(dbprop.getProperty("password"));
OracleConnectionCacheImpl cache = new OracleConnectionCacheImpl(ocpds);
cache.setMaxLimit(Integer.parseInt(dbprop.getProperty("maxconn")));
cache.setCacheScheme(OracleConnectionCacheImpl.DYNAMIC_SCHEME);
/* Taking connection */
return cache.getConnection();


Will I get statement caching for all the connection created in the pool mentioned above or we need to call the ((OracleConnection)conn).setStmtCacheSize(10) method om each and every connection object of this pool.


Kindly mail me your suggestions.

Thanx and regards,

Prashant Parab
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Need some good connection pool
 
Similar Threads
jdbc 2 pool size
Connecting to Oracle from Java
oracle statement caching in connection pool
DB2 Pool Data
oracle connection pool setting and database cursors