openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris <cwolf.a...@gmail.com>
Subject Impossible to get DBCP working with OpenJPA in standalone app
Date Mon, 16 Sep 2013 15:45:35 GMT
When I run my app in a container (JBoss6), the DBCP seems to 
automagically - just work.  However, I also need to enable connection 
pooling for unit testing, i.e. not container-managed. In this case, and 
when there are a lot of records, all the connections are used up.

I tried both documented ways to explicitly configure DBCP:

http://openjpa.apache.org/faq.html#pooling
http://openjpa.apache.org/builds/2.2.2/apache-openjpa/docs/manual.html#ref_guide_dbsetup_thirdparty

Neither of these works, though.  I verified that in standalone mode the 
DBCP code *is* being called, i.e. it calls 
org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(), but 
unlike when deployed in JBoss, the connections seem to "leak", i.e. 
they're never closed / returned to the pool.

Any ideas?


Thanks,


Chris

Mime
View raw message