Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 89996 invoked from network); 15 Aug 2008 23:11:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Aug 2008 23:11:27 -0000 Received: (qmail 11887 invoked by uid 500); 15 Aug 2008 23:11:26 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 11855 invoked by uid 500); 15 Aug 2008 23:11:26 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 11844 invoked by uid 99); 15 Aug 2008 23:11:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Aug 2008 16:11:26 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of david.blevins@visi.com designates 208.42.176.212 as permitted sender) Received: from [208.42.176.212] (HELO g2host.com) (208.42.176.212) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Aug 2008 23:10:29 +0000 Received: from [71.106.104.69] (account dblevins@visi.com HELO [10.0.1.6]) by mailfront1.g2host.com (CommuniGate Pro SMTP 5.1.16) with ESMTPSA id 62846264 for dev@openjpa.apache.org; Fri, 15 Aug 2008 18:10:55 -0500 Message-Id: <9DCE23C9-5E17-4723-8E38-BE79038C641B@visi.com> From: David Blevins To: dev@openjpa.apache.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v926) Subject: TransactionSynchronizationRegistry reference cached permanently Date: Fri, 15 Aug 2008 16:10:53 -0700 X-Mailer: Apple Mail (2.926) X-Virus-Checked: Checked by ClamAV on apache.org 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)