Hi Annette,

Are you using container managed EntityManagers, or application managed EMs?

It *sounds* like you the EntityManager isn't being closed.

To answer your specific question the connection is opened the first time you
interact with the database (ie execute a query, or persist an entity). When
it's closed depends on the ConnectionRetainMode setting [1] (looks like
you're using 'always').

[1]
http://openjpa.apache.org/builds/1.2.1/apache-openjpa-1.2.1/docs/manual/manual.html#ref_guide_dbsetup_retain

HTH
-mike

On Wed, Jul 8, 2009 at 8:12 AM, Scherer, Annette <
[email protected]> wrote:

> Hello,
>
> I am using OpenJPA with managed transactions and connections on an IBM
> WebSphere Application Server.
>
> Extract from persistence.xml:
> <property name="openjpa.TransactionMode" value="managed"/>
> <property name="openjpa.ConnectionFactoryMode" value="managed"/>
>
> Configuration WAS:
> JDBC - datasources - non XA connection
>
>
> When does a managed connection open and when does it close?
> My problem is that many connections will be opened that are never closed
> again. Even if I shut down the Server, the connections remain open.
>
>
> Thank you for help
> Annette Scherer
>
>
> Abteilung Informatik
>
>
>

Reply via email to