[ 
https://issues.apache.org/jira/browse/OPENJPA-734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Dick closed OPENJPA-734.
--------------------------------

    Resolution: Fixed

Fixed in revision 700603. 

The change adds a dbcp.args property to pom.xml. The property is passed in to 
the surefire test harness and used when to configure the connection pool.

The property may be set on the command line  or in a profile in 
.m2/settings.xml. 

Example command line usage : 
$ mvn test -Ddbcp.args=MaxActive =5,MaxIdle=2

Example settings.xml usage: 
<profile>
    <id>unreasonably-large-pool<id>
    <properties> 
         <dbcp.args>MaxActive=1000,MaxIdle=0,MaxWait=500</dbcp.args>
    </properties>
</profile> 

$ mvn test -Punreasonably-large-pool

More practical examples include increasing the MaxIdle to avoid the overhead of 
creating connections. 

The default settings may be found in pom.xml (openjpa-persistence-jdbc) and are 
currently MaxActive=100,MaxIdle=0,MaxWait=10000

> Commons DBCP parameters should be configurable. 
> ------------------------------------------------
>
>                 Key: OPENJPA-734
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-734
>             Project: OpenJPA
>          Issue Type: Improvement
>            Reporter: Michael Dick
>            Assignee: Michael Dick
>            Priority: Minor
>             Fix For: 1.3.0
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> Per conversation on the users mailing list [1] it would be nice to make the 
> connection pool used for unit tests configurable. Some environments are not 
> well suited to handle the current list of defaults. 
> [1] http://openjpa.markmail.org/message/uctj54wt733wxtp4?q=milosz 
> or 
> http://n2.nabble.com/Test-suite-slow-on-DB2-td1115993.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to