[jboss-jira] [JBoss JIRA] (WFLY-8524) OwnableReentrantLock can't recognize two different but equal transaction objects as the same transaction

David Lloyd (JIRA) issues at jboss.org
Fri Apr 7 10:50:00 EDT 2017


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

David Lloyd commented on WFLY-8524:
-----------------------------------

Might also be the cause of exceptions like this:

{noformat}
2017-04-07 09:47:10 Caused by: java.lang.IllegalMonitorStateException
2017-04-07 09:47:10 	at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:151)
2017-04-07 09:47:10 	at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1261)
2017-04-07 09:47:10 	at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:457)
2017-04-07 09:47:10 	at org.jboss.as.ejb3.timerservice.persistence.filestore.FileTimerPersistence.persistTimer(FileTimerPersistence.java:240)
2017-04-07 09:47:10 	at org.jboss.as.ejb3.timerservice.persistence.filestore.FileTimerPersistence.addTimer(FileTimerPersistence.java:177)
2017-04-07 09:47:10 	at org.jboss.as.ejb3.timerservice.TimerServiceImpl.persistTimer(TimerServiceImpl.java:607)
2017-04-07 09:47:10 	... 70 more
{noformat}

> 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
>            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.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list