openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Curtis <>
Subject Re: connection leak after sql exception
Date Fri, 01 May 2009 13:35:33 GMT

Good to hear you figured out what was going on! I dug through the code/tested
yesterday and didn't see anywhere that OpenJPA would leak a connection. 


Julian Graham wrote:
> Hi all,
> Actually after some concerted debugging and digging around in the
> code, it looks like this is actually a problem with Spring
> Transactions, Glassfish, or a combination of the two: When Spring's
> JtaTransactionManager has direct access to the UserTransaction, for
> some reason it fails to notify OpenJPA's EntityManager when a
> transaction has been rolled back.  Forcing Spring's transaction
> manager to interact with the appserver's transactions via the JTA
> TransactionManager instead seems to resolve this (FWIW, the fix is to
> set JtaTransactionManager's "autodetectUserTransaction" property to
> false).
> Regards,
> Julian

View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message