[jboss-jira] [JBoss JIRA] Resolved: (JBAS-6348) Problem with QueuedPessimisticEJBLock and Arjuna

Alexey Loubyansky (JIRA) jira-events at lists.jboss.org
Fri Dec 17 11:03:19 EST 2010


     [ https://issues.jboss.org/browse/JBAS-6348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Loubyansky resolved JBAS-6348.
-------------------------------------

    Resolution: Done


It's been committed to the AS trunk and will be available in 6.0.0.Final.

Thanks!

--- src/main/java/org/jboss/ejb/plugins/lock/QueuedPessimisticEJBLock.java	(revision 109990)
+++ src/main/java/org/jboss/ejb/plugins/lock/QueuedPessimisticEJBLock.java	(working copy)
@@ -177,11 +177,12 @@
 
    protected boolean isTxExpired(Transaction miTx) throws Exception
    {
-      if (miTx != null && miTx.getStatus() == Status.STATUS_MARKED_ROLLBACK)
-      {
-         return true;
-      }
-      return false;
+      if(miTx == null)
+         return false;
+      int status = miTx.getStatus();
+      return status == Status.STATUS_MARKED_ROLLBACK ||
+         status == Status.STATUS_ROLLEDBACK ||
+         status == Status.STATUS_ROLLING_BACK;


> Problem with QueuedPessimisticEJBLock and Arjuna
> ------------------------------------------------
>
>                 Key: JBAS-6348
>                 URL: https://issues.jboss.org/browse/JBAS-6348
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Transaction Manager Integration (Arjuna)
>    Affects Versions: JBossAS-4.2.3.GA
>            Reporter: Ole Husgaard
>            Assignee: Alexey Loubyansky
>             Fix For: 6.0.0.Final
>
>
> When using Arjuna, QueuedPessimisticEJBLock does not always properly detect that a waiting tx has timed out. The problem is that QueuedPessimisticEJBLock was written for the old TM, which did not rollback transactions on timeout, but only marked them for rollback. Now that Arjuna is in play, it has to check for rolled back transactions too.
> The isTxExpired() method should be changed to something like this:
> protected boolean isTxExpired(Transaction miTx) throws Exception {
> 	if (miTx != null
> 			&& (miTx.getStatus() == Status.STATUS_MARKED_ROLLBACK || miTx.getStatus() == Status.STATUS_ROLLEDBACK)) {
> 		return true;
> 	}
> 	return false;
> }

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list