activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Graf (JIRA)" <>
Subject [jira] [Commented] (AMQ-5189) Rollback on XASession when closing back to pool
Date Mon, 19 May 2014 18:12:41 GMT


Benjamin Graf commented on AMQ-5189:

Since this problem is not deterministic its quite hard to deliver a test case. But if you
look at the code you can see that this problem does still exist in trunk code.
Look at XaConnectionPool line 106 where the close operation on the PooledSession object is
invoked which returns itself back into the pool in line 152. But the Synchronization object
of XaConnectionPool does still change values after that in line 107 and 108 while the pool
object might be used again in another thread. So it is obvious that a collition can occured!

> Rollback on XASession when closing back to pool
> -----------------------------------------------
>                 Key: AMQ-5189
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: activemq-pool
>    Affects Versions: 5.7.0, 5.8.0, 5.9.0, 5.9.1
>         Environment: Windows, UNIX
>            Reporter: Benjamin Graf
> If you have a pool of XASession under load (heavy load might be necessary) I register
sometimes following Exception "Cannot rollback() inside an XASession" in afterCompletion synchronisation.
After some analysis and patching with logging I recognized that the session object is returned
back to pool before setting the xa flag back to false. This leads to the effect that this
session gets be used again by another thread while the earlier one switches the xa flag to

This message was sent by Atlassian JIRA

View raw message