Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 62730 invoked from network); 3 Dec 2008 03:20:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Dec 2008 03:20:30 -0000 Received: (qmail 84858 invoked by uid 500); 3 Dec 2008 03:20:40 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 84819 invoked by uid 500); 3 Dec 2008 03:20:40 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 84808 invoked by uid 99); 3 Dec 2008 03:20:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Dec 2008 19:20:40 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [209.86.89.63] (HELO elasmtp-junco.atl.sa.earthlink.net) (209.86.89.63) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Dec 2008 03:19:11 +0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=fm0Uxcirb2yYxtW+Tw49pnG5A1Gu2/AERC0rCP3zH3dcZb+4L3590M6BcPK7QvLc; h=Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-ELNK-Trace:X-Originating-IP; Received: from [24.40.200.241] (helo=tetra.local) by elasmtp-junco.atl.sa.earthlink.net with esmtpa (Exim 4.67) (envelope-from ) id 1L7iH4-0000aF-Cl for dev@geronimo.apache.org; Tue, 02 Dec 2008 22:19:38 -0500 Message-ID: <4935FAC9.7030708@earthlink.net> Date: Tue, 02 Dec 2008 22:19:37 -0500 From: Joe Bohn User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 To: dev@geronimo.apache.org Subject: Re: svn commit: r722725 - in /geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-transaction/src: main/java/org/apache/geronimo/transaction/manager/ test/java/org/apache/geronimo/transaction/manager/ References: <20081203025112.2D12E238895F@eris.apache.org> In-Reply-To: <20081203025112.2D12E238895F@eris.apache.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ELNK-Trace: c408501814fc19611aa676d7e74259b7b3291a7d08dfec79e4e3d1aaf5d10e40fee9c99507e966e9350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 24.40.200.241 X-Virus-Checked: Checked by ClamAV on apache.org Hi Lin, A few questions: - Why modify branches/2.1.1? I'm not sure, but it looks like this is an old branch that was subsequently copied to tags/2.1.1 (rather than moved to tags). - Where is the new testTransactionKey() method used that was added here and in trunk? - Is this something that we need to consider including with Geronimo 2.2? Joe linsun@apache.org wrote: > Author: linsun > Date: Tue Dec 2 18:51:11 2008 > New Revision: 722725 > > URL: http://svn.apache.org/viewvc?rev=722725&view=rev > Log: > GERONIMO-4438 - TransactionSynchronizationRegistry.getTransactionKey should return null when transaction is not associated with the current thread > > Modified: > geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionManagerImpl.java > geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-transaction/src/test/java/org/apache/geronimo/transaction/manager/TransactionSynchronizationRegistryTest.java > > Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionManagerImpl.java > URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionManagerImpl.java?rev=722725&r1=722724&r2=722725&view=diff > ============================================================================== > --- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionManagerImpl.java (original) > +++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionManagerImpl.java Tue Dec 2 18:51:11 2008 > @@ -205,8 +205,8 @@ > } > > public Object getTransactionKey() { > - TransactionImpl tx = getActiveTransactionImpl(); > - return tx.getTransactionKey(); > + TransactionImpl tx = (TransactionImpl) getTransaction(); > + return tx == null ? null: tx.getTransactionKey(); > } > > public int getTransactionStatus() { > > Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-transaction/src/test/java/org/apache/geronimo/transaction/manager/TransactionSynchronizationRegistryTest.java > URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-transaction/src/test/java/org/apache/geronimo/transaction/manager/TransactionSynchronizationRegistryTest.java?rev=722725&r1=722724&r2=722725&view=diff > ============================================================================== > --- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-transaction/src/test/java/org/apache/geronimo/transaction/manager/TransactionSynchronizationRegistryTest.java (original) > +++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-transaction/src/test/java/org/apache/geronimo/transaction/manager/TransactionSynchronizationRegistryTest.java Tue Dec 2 18:51:11 2008 > @@ -57,6 +57,15 @@ > tm.getTransaction().registerSynchronization(normalSync); > } > > + public void testTransactionKey() throws Exception { > + normalSync = new CountingSync(); > + assertNull(tm.getTransactionKey()); > + setUpInterposedSync(); > + tm.getTransaction().registerSynchronization(normalSync); > + assertNotNull(tm.getTransactionKey()); > + tm.commit(); > + assertNull(tm.getTransactionKey()); > + } > > public void testInterposedSynchIsCalledOnCommit() throws Exception { > setUpInterposedSync(); > > >