jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Köll (JIRA) <j...@apache.org>
Subject [jira] [Updated] (JCR-3425) XAAwareRWLock implementation fails with IllegalStateException on JBoss AS7
Date Wed, 12 Sep 2012 14:37:08 GMT

     [ https://issues.apache.org/jira/browse/JCR-3425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Claus Köll updated JCR-3425:

          Component/s:     (was: jackrabbit-jca)
    Affects Version/s: 2.5.1
> XAAwareRWLock implementation fails with IllegalStateException on JBoss AS7
> --------------------------------------------------------------------------
>                 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öll
> The class XAAwareRWLock uses a HashMap readers_. The static function TransactionContext.getCurrentThreadId()
is used to obtain an object currentId used as key in for the HashMap. When running under a
transaction the currentId is set to Xid.getGlobalTransactionId which returns a byte[]. 
> However, the class org.jboss.jca.core.spi.transaction.xa.XidWrapper.getGlobalTransactionId()
returns globalTransactionId.clone() - it returns a new instance of byte[] on every invocation
and the hashCode of the byte[] changes. Therefore, readers_.get(currentId) returns null for
the second invocation in the same transaction and the result ist an IllegalStateTransaction:
>  java.lang.IllegalStateException
> 	at org.apache.jackrabbit.core.version.VersioningLock$XAAwareRWLock.endRead(VersioningLock.java:167)
> ...
> I suggest using a wrapper for the globalTransactionId byte[] that computes 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 administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message