]
Paul Ferraro reassigned WFLY-8524:
----------------------------------
Assignee: Tomasz Adamski (was: Paul Ferraro)
OwnableReentrantLock can't recognize two different but equal
transaction objects as the same transaction
--------------------------------------------------------------------------------------------------------
Key: WFLY-8524
URL:
https://issues.jboss.org/browse/WFLY-8524
Project: WildFly
Issue Type: Bug
Components: EJB, Transactions
Reporter: David Lloyd
Assignee: Tomasz Adamski
Priority: Critical
The transaction manager is allowed to create more than one Transaction object for an
imported transaction, and has been observed to do so in at least distributed JTA cases if
not other cases.
The JTA specification says that the equals method must return true for two objects that
refer to the same transaction. Therefore OwnableReentrantLock must use equals() on its
owner argument.
As an aside, that class should probably also null-check its owner object on lock() to
avoid weird states.