[jboss-svn-commits] JBL Code SVN: r29849 - in labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery: coordinator/ba and 2 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Oct 28 10:18:44 EDT 2009
Author: adinn
Date: 2009-10-28 10:18:43 -0400 (Wed, 28 Oct 2009)
New Revision: 29849
Modified:
labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/coordinator/at/ACCoordinatorRecoveryModule.java
labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/coordinator/at/SubordinateCoordinatorRecoveryModule.java
labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/coordinator/ba/BACoordinatorRecoveryModule.java
labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/participant/at/ATParticipantRecoveryModule.java
labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/participant/ba/BAParticipantRecoveryModule.java
Log:
updated XTS to cope with changes to Uid -- fixes JBTM-629
Modified: labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/coordinator/at/ACCoordinatorRecoveryModule.java
===================================================================
--- labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/coordinator/at/ACCoordinatorRecoveryModule.java 2009-10-28 14:16:19 UTC (rev 29848)
+++ labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/coordinator/at/ACCoordinatorRecoveryModule.java 2009-10-28 14:18:43 UTC (rev 29849)
@@ -32,6 +32,7 @@
import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
import com.arjuna.ats.arjuna.common.Uid;
import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.internal.arjuna.common.UidHelper;
import com.arjuna.common.util.logging.DebugLevel;
import com.arjuna.common.util.logging.VisibilityLevel;
@@ -262,41 +263,36 @@
+ " transactions" ) ;
}
- Uid theUid = new Uid( Uid.nullUid() );
+ final Uid NULL_UID = Uid.nullUid();
+ Uid theUid = null;
- boolean moreUids = true ;
-
- while (moreUids)
+ while (true)
{
try
{
- theUid.unpack( uids ) ;
+ theUid = UidHelper.unpackFrom( uids ) ;
- if (theUid.equals( Uid.nullUid() ))
- {
- moreUids = false;
- }
- else
- {
- Uid newUid = new Uid( theUid ) ;
-
- if (XTSLogger.arjLogger.isDebugEnabled())
- {
- XTSLogger.arjLogger.debug
- ( DebugLevel.FUNCTIONS,
- VisibilityLevel.VIS_PUBLIC,
- FacilityCode.FAC_CRASH_RECOVERY,
- "found transaction "+ newUid ) ;
- }
-
- uidVector.addElement( newUid ) ;
- }
}
catch ( Exception ex )
{
- moreUids = false;
+ break;
}
+ if (theUid.equals(NULL_UID))
+ {
+ break;
+ }
+ if (XTSLogger.arjLogger.isDebugEnabled())
+ {
+ XTSLogger.arjLogger.debug
+ ( DebugLevel.FUNCTIONS,
+ VisibilityLevel.VIS_PUBLIC,
+ FacilityCode.FAC_CRASH_RECOVERY,
+ "found transaction "+ theUid ) ;
+ }
+
+ uidVector.addElement( theUid ) ;
}
+
return uidVector ;
}
Modified: labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/coordinator/at/SubordinateCoordinatorRecoveryModule.java
===================================================================
--- labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/coordinator/at/SubordinateCoordinatorRecoveryModule.java 2009-10-28 14:16:19 UTC (rev 29848)
+++ labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/coordinator/at/SubordinateCoordinatorRecoveryModule.java 2009-10-28 14:18:43 UTC (rev 29849)
@@ -32,6 +32,7 @@
import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
import com.arjuna.ats.arjuna.common.Uid;
import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.internal.arjuna.common.UidHelper;
import com.arjuna.common.util.logging.DebugLevel;
import com.arjuna.common.util.logging.VisibilityLevel;
@@ -266,41 +267,35 @@
+ " transactions" ) ;
}
- Uid theUid = new Uid( Uid.nullUid() );
+ final Uid NULL_UID = Uid.nullUid();
+ Uid theUid = null;
- boolean moreUids = true ;
-
- while (moreUids)
+ while (true)
{
try
{
- theUid.unpack( uids ) ;
-
- if (theUid.equals( Uid.nullUid() ))
- {
- moreUids = false;
- }
- else
- {
- Uid newUid = new Uid( theUid ) ;
-
- if (XTSLogger.arjLogger.isDebugEnabled())
- {
- XTSLogger.arjLogger.debug
- ( DebugLevel.FUNCTIONS,
- VisibilityLevel.VIS_PUBLIC,
- FacilityCode.FAC_CRASH_RECOVERY,
- "found transaction "+ newUid ) ;
- }
-
- uidVector.addElement( newUid ) ;
- }
+ theUid = UidHelper.unpackFrom( uids ) ;
}
catch ( Exception ex )
{
- moreUids = false;
+ break;
}
+ if (theUid.equals(NULL_UID ))
+ {
+ break;
+ }
+ if (XTSLogger.arjLogger.isDebugEnabled())
+ {
+ XTSLogger.arjLogger.debug
+ ( DebugLevel.FUNCTIONS,
+ VisibilityLevel.VIS_PUBLIC,
+ FacilityCode.FAC_CRASH_RECOVERY,
+ "found transaction "+ theUid ) ;
+ }
+
+ uidVector.addElement( theUid ) ;
}
+
return uidVector ;
}
Modified: labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/coordinator/ba/BACoordinatorRecoveryModule.java
===================================================================
--- labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/coordinator/ba/BACoordinatorRecoveryModule.java 2009-10-28 14:16:19 UTC (rev 29848)
+++ labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/coordinator/ba/BACoordinatorRecoveryModule.java 2009-10-28 14:18:43 UTC (rev 29849)
@@ -32,6 +32,7 @@
import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
import com.arjuna.ats.arjuna.common.Uid;
import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.internal.arjuna.common.UidHelper;
import com.arjuna.common.util.logging.DebugLevel;
import com.arjuna.common.util.logging.VisibilityLevel;
@@ -262,41 +263,35 @@
+ " transactions" ) ;
}
- Uid theUid = new Uid( Uid.nullUid() );
+ Uid NULL_UID = Uid.nullUid();
+ Uid theUid = null;
- boolean moreUids = true ;
-
- while (moreUids)
+ while (true)
{
try
{
- theUid.unpack( uids ) ;
-
- if (theUid.equals( Uid.nullUid() ))
- {
- moreUids = false;
- }
- else
- {
- Uid newUid = new Uid( theUid ) ;
-
- if (XTSLogger.arjLogger.isDebugEnabled())
- {
- XTSLogger.arjLogger.debug
- ( DebugLevel.FUNCTIONS,
- VisibilityLevel.VIS_PUBLIC,
- FacilityCode.FAC_CRASH_RECOVERY,
- "found transaction "+ newUid ) ;
- }
-
- uidVector.addElement( newUid ) ;
- }
+ theUid = UidHelper.unpackFrom( uids ) ;
}
catch ( Exception ex )
{
- moreUids = false;
+ break;
}
+ if (theUid.equals( NULL_UID))
+ {
+ break;
+ }
+ if (XTSLogger.arjLogger.isDebugEnabled())
+ {
+ XTSLogger.arjLogger.debug
+ ( DebugLevel.FUNCTIONS,
+ VisibilityLevel.VIS_PUBLIC,
+ FacilityCode.FAC_CRASH_RECOVERY,
+ "found transaction "+ theUid ) ;
+ }
+
+ uidVector.addElement( theUid ) ;
}
+
return uidVector ;
}
Modified: labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/participant/at/ATParticipantRecoveryModule.java
===================================================================
--- labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/participant/at/ATParticipantRecoveryModule.java 2009-10-28 14:16:19 UTC (rev 29848)
+++ labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/participant/at/ATParticipantRecoveryModule.java 2009-10-28 14:18:43 UTC (rev 29849)
@@ -29,6 +29,7 @@
import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
import com.arjuna.ats.arjuna.common.Uid;
import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.internal.arjuna.common.UidHelper;
import com.arjuna.common.util.logging.DebugLevel;
import com.arjuna.common.util.logging.VisibilityLevel;
@@ -254,41 +255,37 @@
+ " WS-AT participants" ) ;
}
- Uid theUid = new Uid( Uid.nullUid() );
+ Uid NULL_UID = Uid.nullUid();
+ Uid theUid = null;
- boolean moreUids = true ;
-
- while (moreUids)
+ while (true)
{
try
{
- theUid.unpack( uids ) ;
-
- if (theUid.equals( Uid.nullUid() ))
- {
- moreUids = false;
- }
- else
- {
- Uid newUid = new Uid( theUid ) ;
-
- if (XTSLogger.arjLogger.isDebugEnabled())
- {
- XTSLogger.arjLogger.debug
- ( DebugLevel.FUNCTIONS,
- VisibilityLevel.VIS_PUBLIC,
- FacilityCode.FAC_CRASH_RECOVERY,
- "found WS-AT participant "+ newUid ) ;
- }
-
- uidVector.addElement( newUid ) ;
- }
+ theUid = UidHelper.unpackFrom( uids ) ;
}
catch ( Exception ex )
{
- moreUids = false;
+ break;
}
+
+ if (theUid.equals( NULL_UID ))
+ {
+ break;
+ }
+
+ if (XTSLogger.arjLogger.isDebugEnabled())
+ {
+ XTSLogger.arjLogger.debug
+ ( DebugLevel.FUNCTIONS,
+ VisibilityLevel.VIS_PUBLIC,
+ FacilityCode.FAC_CRASH_RECOVERY,
+ "found WS-AT participant "+ theUid ) ;
+ }
+
+ uidVector.addElement( theUid ) ;
}
+
return uidVector ;
}
Modified: labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/participant/ba/BAParticipantRecoveryModule.java
===================================================================
--- labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/participant/ba/BAParticipantRecoveryModule.java 2009-10-28 14:16:19 UTC (rev 29848)
+++ labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/participant/ba/BAParticipantRecoveryModule.java 2009-10-28 14:18:43 UTC (rev 29849)
@@ -29,6 +29,7 @@
import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
import com.arjuna.ats.arjuna.common.Uid;
import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.internal.arjuna.common.UidHelper;
import com.arjuna.common.util.logging.DebugLevel;
import com.arjuna.common.util.logging.VisibilityLevel;
@@ -240,41 +241,37 @@
+ " WS-BA participants" ) ;
}
- Uid theUid = new Uid( Uid.nullUid() );
+ Uid NULL_UID = Uid.nullUid();
+ Uid theUid = null;
- boolean moreUids = true ;
-
- while (moreUids)
+ while (true)
{
try
{
- theUid.unpack( uids ) ;
-
- if (theUid.equals( Uid.nullUid() ))
- {
- moreUids = false;
- }
- else
- {
- Uid newUid = new Uid( theUid ) ;
-
- if (XTSLogger.arjLogger.isDebugEnabled())
- {
- XTSLogger.arjLogger.debug
- ( DebugLevel.FUNCTIONS,
- VisibilityLevel.VIS_PUBLIC,
- FacilityCode.FAC_CRASH_RECOVERY,
- "found WS-BA participant "+ newUid ) ;
- }
-
- uidVector.addElement( newUid ) ;
- }
+ theUid = UidHelper.unpackFrom( uids ) ;
}
catch ( Exception ex )
{
- moreUids = false;
+ break;
}
+
+ if (theUid.equals( NULL_UID ))
+ {
+ break;
+ }
+
+ if (XTSLogger.arjLogger.isDebugEnabled())
+ {
+ XTSLogger.arjLogger.debug
+ ( DebugLevel.FUNCTIONS,
+ VisibilityLevel.VIS_PUBLIC,
+ FacilityCode.FAC_CRASH_RECOVERY,
+ "found WS-BA participant "+ theUid ) ;
+ }
+
+ uidVector.addElement( theUid ) ;
}
+
return uidVector ;
}
More information about the jboss-svn-commits
mailing list