Java Mailing List Archive

http://www.gg3721.com/

Home » users.openjpa »

openjpa & DBCP

Georgi Naplatanov

2008-06-18

Replies: Find Java Web Hosting

Author LoginPost Reply
Hello, list.

The configuration example -
"How do I enable connection pooling in OpenJPA?" at
http://openjpa.apache.org/faq.html, do not work for me.
The exmple is :

<property name="openjpa.ConnectionURL"
value="DriverClassName=org.apache.derby.jdbc.ClientDriver,
           Url=jdbc:derby://localhost:1527/database,
           MaxActive=100,
           MaxWait=10000,
           TestOnBorrow=true,
           Username=user,
           Password=secret"/>

, but i use another example which i found in the internet :

<property name="openjpa.ConnectionProperties"
                value="DriverClassName=org.postgresql.Driver,
                Url=jdbc:postgresql://localhost/jpa_tests,
                Username=jpa_tests,
                Password=secret,
                MaxActive=20,
                maxIdle=20,
                initialSize=20,
                defaultAutoCommit=false,
                defaultTransactionIsolation=2,
                validationQuery=select 1"/>

which work, but i have another issue. When i close EntityManagerFactory
instance, it does not close db connections immediately.

I don't know where is the problem, in the configuration or it's OpenJPA
issue.

Best regards
Georgi
©2008 gg3721.com - Jax Systems, LLC, U.S.A.