activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (Assigned) (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (AMQ-3465) TransactionContext produces errors in concurrent environment
Date Tue, 27 Sep 2011 13:55:11 GMT

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

Timothy Bish reassigned AMQ-3465:
---------------------------------

    Assignee: Timothy Bish
    
> TransactionContext produces errors in concurrent environment
> ------------------------------------------------------------
>
>                 Key: AMQ-3465
>                 URL: https://issues.apache.org/jira/browse/AMQ-3465
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.5.0
>         Environment: Windows XP SP2, Oracle JDK 1.6.0_23
>            Reporter: Alexei Akimov
>            Assignee: Timothy Bish
>             Fix For: 5.6.0
>
>
> Method "isInXATransaction" of class org.apache.activemq.TransactionContext seems to be
implemeted incorrectly. Here is the code:
> public boolean isInXATransaction() {
>     return (transactionId != null && transactionId.isXATransaction()) || !ENDED_XA_TRANSACTION_CONTEXTS.isEmpty();
> }
> Map "ENDED_XA_TRANSACTION_CONTEXTS" is a static field. TransactionContext instances are
used for both outbound and inbound communications. Suppose a thread creating a new non-transactional
session. It calls isInXATransaction and gets true, just because another thread is completing
transactional message delivery at the same time. After XAResource.end() call but before XAResource.commit()
call the map is not empty and it results in a JMSException in the first thread (see org.apache.activemq.ra.ManagedTransactionContext.setUseSharedTxContext(boolean)").

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message