openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject TransactionSynchronizationRegistry reference cached permanently
Date Fri, 15 Aug 2008 23:10:53 GMT
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
View raw message