Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C8CCADC98 for ; Tue, 25 Sep 2012 08:05:12 +0000 (UTC) Received: (qmail 32085 invoked by uid 500); 25 Sep 2012 08:05:12 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 31947 invoked by uid 500); 25 Sep 2012 08:05:10 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 31894 invoked by uid 99); 25 Sep 2012 08:05:08 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Sep 2012 08:05:07 +0000 Date: Tue, 25 Sep 2012 19:05:07 +1100 (NCT) From: =?utf-8?Q?Claus_K=C3=B6ll_=28JIRA=29?= To: dev@jackrabbit.apache.org Message-ID: <1259983572.120940.1348560307994.JavaMail.jiratomcat@arcas> In-Reply-To: <658112256.69057.1347452467878.JavaMail.jiratomcat@arcas> Subject: [jira] [Updated] (JCR-3425) XAAwareRWLock implementation fails with IllegalStateException on JBoss AS7 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/JCR-3425?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Claus K=C3=B6ll updated JCR-3425: ---------------------------- Resolution: Fixed Fix Version/s: 2.4.4 Status: Resolved (was: Patch Available) Patch committed in revision 1389741. =20 > XAAwareRWLock implementation fails with IllegalStateException on JBoss AS= 7 > -------------------------------------------------------------------------= - > > Key: JCR-3425 > URL: https://issues.apache.org/jira/browse/JCR-3425 > Project: Jackrabbit Content Repository > Issue Type: Bug > Components: jackrabbit-core, transactions > Affects Versions: 2.4.3, 2.5.1 > Environment: JBoss AS7 7.1.1.Final > Reporter: Martin Centner > Assignee: Claus K=C3=B6ll > Fix For: 2.4.4 > > Attachments: JCR-3425.patch > > > The class XAAwareRWLock uses a HashMap readers_. The static function Tran= sactionContext.getCurrentThreadId() is used to obtain an object currentId u= sed as key in for the HashMap. When running under a transaction the current= Id is set to Xid.getGlobalTransactionId which returns a byte[].=20 > However, the class org.jboss.jca.core.spi.transaction.xa.XidWrapper.getGl= obalTransactionId() returns globalTransactionId.clone() - it returns a new = instance of byte[] on every invocation and the hashCode of the byte[] chang= es. Therefore, readers_.get(currentId) returns null for the second invocati= on in the same transaction and the result ist an IllegalStateTransaction: > java.lang.IllegalStateException > =09at org.apache.jackrabbit.core.version.VersioningLock$XAAwareRWLock.end= Read(VersioningLock.java:167) [jackrabbit-core-2.4.3.jar:2.4.3] > ... > I suggest using a wrapper for the globalTransactionId byte[] that compute= s the hashCode on the contents of the byte instead of the object identity. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira