[jbosscache-dev] Using Apache DBCP in NonManagedConnectionFactory

Manik Surtani manik at jboss.org
Thu Oct 12 10:26:15 EDT 2006


At the moment, when using the non-managed connection factory in the  
JDBC cache loader, a new connection is created for every operation  
and in high-concurrency environments this can exhaust the db  
connections.

Should we be using a pooling library like Apache's DBCP[1] for this?   
Probably increase efficiency a great deal.  A user attempting to  
improve throughput hacked in an open connection and stored it in  
thread-local and saw some really big improvements[2].  His hack is  
not a solution since it breaks when using transactions, but  
highlights the need for a conn pool for people who use this cache  
loader outside of an app server.

[1] http://jakarta.apache.org/commons/dbcp/
[2] http://www.jboss.com/index.html? 
module=bb&op=viewtopic&p=3977895#3977895

What do people think?
--
Manik Surtani

Lead, JBoss Cache
JBoss, a division of Red Hat

Email: manik at jboss.org
Telephone: +44 7786 702 706
MSN: manik at surtani.org
Yahoo/AIM/Skype: maniksurtani





More information about the jbosscache-dev mailing list