[jboss-jira] [JBoss JIRA] (WFLY-6935) CMTTxInterceptor transaction comparison

Tomasz Adamski (JIRA) issues at jboss.org
Tue Aug 9 15:56:00 EDT 2016


    [ https://issues.jboss.org/browse/WFLY-6935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13276998#comment-13276998 ] 

Tomasz Adamski commented on WFLY-6935:
--------------------------------------

In CMTTxInterceptor#endTransaction method:
{code}
            if (tx != tm.getTransaction()) {
                throw EjbLogger.ROOT_LOGGER.wrongTxOnThread(tx, tm.getTransaction());
            }
{code}
We could not compare transaction objects using == opeator as there is no guarantee that the objects will be the same if they represent the same transaction. Specifically if the transaction is canceled because of timeout but it stays associated with the tread the transaction manager will create the new transaction object when the TransactionManager#getTransaction method is called. We should use equals operator instead.

> CMTTxInterceptor transaction comparison
> ---------------------------------------
>
>                 Key: WFLY-6935
>                 URL: https://issues.jboss.org/browse/WFLY-6935
>             Project: WildFly
>          Issue Type: Bug
>          Components: EJB
>    Affects Versions: 10.1.0.CR1
>            Reporter: Tomasz Adamski
>            Assignee: Tomasz Adamski
>




--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list