openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Sutter" <kwsut...@gmail.com>
Subject Re: TransactionSynchronizationRegistry reference cached permanently
Date Mon, 18 Aug 2008 15:37:01 GMT
Hi David,
Can you expand on your scenario just a bit?  If OpenJPA is using a
TransactionManager and TransactionSynchronizationRegistry, then isn't it
running in a managed container environment (ie. app server)?  And, if the
app server gets rebooted, wouldn't OpenJPA get rebooted at the same time?
Or, is your scenario allowing an OpenJPA "client" to access the
Transaction-related resources in an app server process separate from the
client?

Thanks,
Kevin

On Fri, Aug 15, 2008 at 6:10 PM, David Blevins <david.blevins@visi.com>wrote:

> Seems there are some slight differences in the way OpenJPA tracks the
> TransactionManager reference versus the TransactionSynchronizationRegistry.
>  The TransactionManager appears to be fetched once per EntityManagerFactory,
> so if the underlying app server does any sort of rebooting the new
> TransactionManager instance is picked up just fine as OpenJPA continues to
> get it from the app server.  This is good.  However when it comes to the
> TransactionSynchronizationRegistry, it seems OpenJPA grabs it once for the
> life of the VM and never lets it go.  So if any sort of rebooting happens in
> the app server OpenJPA will not get the new
> TransactionSynchronizationRegistry and of course ceases to work properly.
>
>
> Is it possible we can get this fixed for the next release?
>
> -David
>
> (pulled these stack traces of the code referencing the old
> TransactionSynchronizationRegistry, may or may not be useful to you)
>
>  at
> org.apache.openjpa.ee.RegistryManagedRuntime$TransactionManagerRegistryFacade.getStatus(RegistryManagedRuntime.java:130)
>  at
> org.apache.openjpa.kernel.AbstractBrokerFactory.syncWithManagedTransaction(AbstractBrokerFactory.java:723)
>  at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:320)
>  at
> org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(AbstractBrokerFactory.java:216)
>  at
> org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:190)
>  at
> org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:142)
>  at
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:192)
>  at
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:56)
>
>         --
>  at
> org.apache.openjpa.ee.RegistryManagedRuntime$TransactionManagerRegistryFacade.getStatus(RegistryManagedRuntime.java:130)
>  at
> org.apache.openjpa.kernel.AbstractBrokerFactory.syncWithManagedTransaction(AbstractBrokerFactory.java:723)
>  at
> org.apache.openjpa.kernel.BrokerImpl.syncWithManagedTransaction(BrokerImpl.java:1391)
>  at
> org.apache.openjpa.kernel.DelegatingBroker.syncWithManagedTransaction(DelegatingBroker.java:893)
>  at
> org.apache.openjpa.persistence.EntityManagerImpl.joinTransaction(EntityManagerImpl.java:501)
>
>         --
>  at
> org.apache.openjpa.ee.RegistryManagedRuntime$TransactionManagerRegistryFacade.registerSynchronization(RegistryManagedRuntime.java:118)
>  at
> org.apache.openjpa.kernel.AbstractBrokerFactory.syncWithManagedTransaction(AbstractBrokerFactory.java:735)
>  at
> org.apache.openjpa.kernel.BrokerImpl.syncWithManagedTransaction(BrokerImpl.java:1391)
>  at
> org.apache.openjpa.kernel.DelegatingBroker.syncWithManagedTransaction(DelegatingBroker.java:893)
>  at
> org.apache.openjpa.persistence.EntityManagerImpl.joinTransaction(EntityManagerImpl.java:501)
>
>         --
>  at
> org.apache.openjpa.ee.RegistryManagedRuntime$TransactionManagerRegistryFacade.getTransactionKey(RegistryManagedRuntime.java:134)
>  at
> org.apache.openjpa.ee.RegistryManagedRuntime.getTransactionKey(RegistryManagedRuntime.java:88)
>  at
> org.apache.openjpa.ee.AutomaticManagedRuntime.getTransactionKey(AutomaticManagedRuntime.java:255)
>  at
> org.apache.openjpa.kernel.AbstractBrokerFactory.syncWithManagedTransaction(AbstractBrokerFactory.java:740)
>  at
> org.apache.openjpa.kernel.BrokerImpl.syncWithManagedTransaction(BrokerImpl.java:1391)
>  at
> org.apache.openjpa.kernel.DelegatingBroker.syncWithManagedTransaction(DelegatingBroker.java:893)
>  at
> org.apache.openjpa.persistence.EntityManagerImpl.joinTransaction(EntityManagerImpl.java:501)
>
>         --
>  at
> org.apache.openjpa.ee.RegistryManagedRuntime$TransactionManagerRegistryFacade.registerSynchronization(RegistryManagedRuntime.java:118)
>  at
> org.apache.openjpa.kernel.AbstractBrokerFactory.syncWithManagedTransaction(AbstractBrokerFactory.java:746)
>  at
> org.apache.openjpa.kernel.BrokerImpl.syncWithManagedTransaction(BrokerImpl.java:1391)
>  at
> org.apache.openjpa.kernel.DelegatingBroker.syncWithManagedTransaction(DelegatingBroker.java:893)
>  at
> org.apache.openjpa.persistence.EntityManagerImpl.joinTransaction(EntityManagerImpl.java:501)
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message