That was ticket! I set maxActive=25
Although I did see that page early on - must have glossed over it -
sorry about that.
I'm wondering why I had a problem since the DBCP docs say that
"MaxActive" defaults to 8:
http://commons.apache.org/proper/commons-dbcp/configuration.html
In any case, now I have DBCP working (thanks, again) and Oracle UCP
working...
Here are some observations of Oracle's UCP, which I cannot vouch
for, or against:
http://stackoverflow.com/questions/2423490/how-good-is-oracle-universal-connection-pool-ucp
In any case, this pool looks like it may be good for production:
http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html#Standalone
Thanks Rick,
-Chris
On 9/17/2013 12:34 PM, Rick Curtis wrote:
Have you tried to configure DBCP directly[1]?
Thanks,
Rick
[1] http://openjpa.apache.org/beginners-performance-guide.html
On Tue, Sep 17, 2013 at 11:19 AM, Chris <cwolf.a...@gmail.com> wrote:
Hi Rick, thanks for offering to help. Below is my persistence.xml. Also
commons-dbcp-1.4.jar is definitely on the classpath.
-Chris
<persistence version="2.0"
xmlns="http://java.sun.com/**xml/ns/persistence<http://java.sun.com/xml/ns/persistence>
"
xmlns:xsi="http://www.w3.org/**2001/XMLSchema-instance<http://www.w3.org/2001/XMLSchema-instance>
"
xsi:schemaLocation="http://**java.sun.com/xml/ns/**persistence<http://java.sun.com/xml/ns/persistence>
http://java.sun.com/xml/ns/**persistence/persistence_2_0.**xsd<http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd>
">
<persistence-unit name="marketdata">
<provider>org.apache.openjpa.**persistence.**PersistenceProviderImpl</**
provider>
<jta-data-source>java:/**DefaultDS</jta-data-source><!-**- ignored
when not in JBoss -->
<class>ms.algo.adapt.cpmd.**entities.MdBaseData</class>
<class>ms.algo.adapt.cpmd.**entities.MdAuxData</class>
<class>ms.algo.adapt.cpmd.**entities.DBSessionInfo</class>
<properties>
<property name="openjpa.jdbc.**DBDictionary"
value="oracle(batchLimit=200)"**/>
<property name="openjpa.**ConnectionDriverName" value="oracle.jdbc.*
*OracleDriver"/>
<property name="openjpa.ConnectionURL" value="jdbc:oracle:thin:@**
localhost:1521:orcl"/>
<property name="openjpa.**ConnectionUserName" value="demouser"/>
<property name="openjpa.**ConnectionPassword" value="demopw"/>
<property name="openjpa.**ConnectionFactoryProperties"
value="QueryTimeout=50000, printParameters=true,
PrettyPrint=true, PrettyPrintLineLength=72"/>
<property name="openjpa.Log" value="openjpa.jdbc.MetaData=**TRACE"/>
<property name="openjpa.Log" value="openjpa.jdbc.JDBC=**TRACE"/>
<property name="openjpa.Log" value="slf4j"/>
<property name="openjpa.Log" value="SQL=TRACE"/>
</properties>
</persistence-unit>
</persistence>
On 9/16/2013 9:46 PM, Rick Curtis wrote:
Chris -
DBCP *should* work for you... I've used it extensively in my testing.
You you post the contents of your persistence.xml file?
Thanks,
Rick
On Mon, Sep 16, 2013 at 10:45 AM, Chris <cwolf.a...@gmail.com> wrote:
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/faq.**html#pooling>
<http://openjpa.**apache.org/faq.html#pooling<http://openjpa.apache.org/faq.html#pooling>
http://openjpa.apache.org/****builds/2.2.2/apache-openjpa/**<http://openjpa.apache.org/**builds/2.2.2/apache-openjpa/**>
docs/manual.html#ref_guide_****dbsetup_thirdparty<http://**
openjpa.apache.org/builds/2.2.**2/apache-openjpa/docs/manual.**
html#ref_guide_dbsetup_**thirdparty<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