[jboss-svn-commits] JBL Code SVN: r31549 - labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/engines.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Feb 10 09:37:07 EST 2010


Author: adinn
Date: 2010-02-10 09:37:06 -0500 (Wed, 10 Feb 2010)
New Revision: 31549

Modified:
   labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/engines/ParticipantEngine.java
Log:
corrected timing issue rolling forward participant state at prepare. now ensures it remains PREPARING until the log is writen -- fixes JBTM-703

Modified: labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/engines/ParticipantEngine.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/engines/ParticipantEngine.java	2010-02-10 14:31:06 UTC (rev 31548)
+++ labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/engines/ParticipantEngine.java	2010-02-10 14:37:06 UTC (rev 31549)
@@ -407,11 +407,6 @@
         synchronized(this)
         {
             current = state ;
-
-            if (current == State.STATE_PREPARING)
-            {
-                state = State.STATE_PREPARED_SUCCESS ;
-            }
         }
 
         if (current == State.STATE_PREPARING)
@@ -437,13 +432,14 @@
             synchronized (this) {
                 current = state;
 
-                if (current == State.STATE_PREPARED_SUCCESS) {
+                if (current == State.STATE_PREPARING) {
                     if (rollbackRequired) {
                         // if we change state to aborting then we are responsible for
                         // calling rollback and sending aborted but we have no log record
                         // to delete
                         state = State.STATE_ABORTING;
                     } else {
+                        state = State.STATE_PREPARED_SUCCESS;
                         // this ensures any subsequent commit or rollback deletes the log record
                         // so we still have no log record to delete here
                         persisted = true;



More information about the jboss-svn-commits mailing list