[jboss-svn-commits] JBL Code SVN: r33757 - in labs/jbosstm/trunk: ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator and 40 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Jul 7 11:05:03 EDT 2010


Author: jhalliday
Date: 2010-07-07 11:05:00 -0400 (Wed, 07 Jul 2010)
New Revision: 33757

Added:
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/BaseStore.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/ObjectStoreAPI.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/ParticipantStore.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/RecoveryStore.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/StoreManager.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/TxLog.java
Modified:
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/StateManager.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/BasicAction.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/TxControl.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/logging/arjunaI18NLogger.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/logging/arjunaI18NLoggerImpl.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/ObjectStore.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/ObjectStoreIterator.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/recovery/ActionStatusService.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/recovery/TransactionStatusConnectionManager.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/OTM.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/ObjectStateQuery.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/ObjectStoreMonitor.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/TransactionMonitor.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/log/LogBrowser.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/osb/mbean/ActionBean.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/osb/mbean/ObjStoreBrowser.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/osb/mbean/StateManagerWrapper.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/TxLogWritePersistenceRecord.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/abstractrecords/CadaverRecord.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/abstractrecords/DisposeRecord.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/abstractrecords/PersistenceRecord.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/AtomicActionRecoveryModule.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/ExpiredTransactionScanner.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/ExpiredTransactionStatusManagerScanner.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/TransactionStatusManagerItem.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/abstractrecords/CadaverActivationUnitTest.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/abstractrecords/CadaverRecordUnitTest.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/abstractrecords/DisposeRecordUnitTest.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/abstractrecords/PersistenceRecordUnitTest.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/atomicaction/TxControlUnitTest.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/AllObjUidsTest.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/CachedTest.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/LogStoreRecoveryTest.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/LogStoreTest.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/LogStoreTest2.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/LogStressTest.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/ObjectStoreTest.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/PersistenceTest.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/RemoveCachedTest.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/WriteCachedTest.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/recovery/ActionTestServer.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/recovery/LogMoveTest.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/recovery/RecoverAtomicActionTest.java
   labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/DefaultStateViewer.java
   labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/frames/BrowserFrame.java
   labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/StateViewerInterface.java
   labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/ArjunaTransactionWrapper.java
   labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/BasicActionInfo.java
   labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/atomicaction/AtomicActionViewer.java
   labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/atomicaction/AtomicActionWrapper.java
   labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/internal/txoj/lockstore/BasicPersistentLockStore.java
   labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/internal/txoj/recovery/RecoveredTransactionalObject.java
   labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/internal/txoj/recovery/TORecoveryModule.java
   labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/txoj/logging/txojI18NLogger.java
   labs/jbosstm/trunk/ArjunaCore/txoj/tests/classes/com/hp/mwtests/ts/txoj/basic/PersistenceTest.java
   labs/jbosstm/trunk/ArjunaCore/txoj/tests/classes/com/hp/mwtests/ts/txoj/recovery/RecoveryModuleUnitTest.java
   labs/jbosstm/trunk/ArjunaCore/txoj/tests/classes/com/hp/mwtests/ts/txoj/recovery/RecoveryTest.java
   labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/recovery/arjunacore/JTATransactionLogXAResourceOrphanFilter.java
   labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/recovery/arjunacore/XARecoveryModule.java
   labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/jca/XATerminatorImple.java
   labs/jbosstm/trunk/ArjunaJTA/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/InFlightTransactionViewer.java
   labs/jbosstm/trunk/ArjunaJTA/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/arjunatransaction/ArjunaTransactionViewer.java
   labs/jbosstm/trunk/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/resources/jts/orbspecific/XAResourceRecord.java
   labs/jbosstm/trunk/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts/jca/XATerminatorImple.java
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/interposition/ServerFactory.java
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/orbspecific/TransactionFactoryImple.java
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/orbspecific/jacorb/recoverycoordinators/JacOrbRCManager.java
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/orbspecific/jacorb/recoverycoordinators/JacOrbRCServiceInit.java
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/contact/ExpiredContactScanner.java
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/contact/FactoryContactItem.java
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/ExpiredAssumedCompleteScanner.java
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/ExpiredServerScanner.java
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/ExpiredToplevelScanner.java
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/RecoveredServerTransaction.java
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/RecoveredTransaction.java
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/ServerTransactionRecoveryModule.java
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/TransactionRecoveryModule.java
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/utils/TxStoreLog.java
   labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/coordinator/at/ATCoordinatorRecoveryModule.java
   labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/coordinator/at/SubordinateATCoordinatorRecoveryModule.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/coordinator/ba/SubordinateBACoordinatorRecoveryModule.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/at/XTSATRecoveryManagerImple.java
   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/XTSBARecoveryManagerImple.java
   labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/astests/taskdefs/TransactionLog.java
Log:
Change ObjectStore use to new interfaces and centralize instance creation. JBTM-683


Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/StateManager.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/StateManager.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/StateManager.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -32,9 +32,10 @@
 package com.arjuna.ats.arjuna;
 
 import com.arjuna.ats.arjuna.coordinator.*;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
 import com.arjuna.ats.arjuna.objectstore.StateType;
 import com.arjuna.ats.arjuna.common.*;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.state.*;
 import com.arjuna.ats.arjuna.utils.Utility;
 import com.arjuna.ats.arjuna.exceptions.FatalError;
@@ -281,7 +282,7 @@
 
                     try
                     {
-                        oldState = objectStore
+                        oldState = participantStore
                                 .read_committed(objectUid, type());
                     }
                     catch (ObjectStoreException e)
@@ -438,10 +439,10 @@
                     try
                     {
                         if (commit)
-                            result = objectStore.write_committed(objectUid, tn,
+                            result = participantStore.write_committed(objectUid, tn,
                                     newState);
                         else
-                            result = objectStore.write_uncommitted(objectUid,
+                            result = participantStore.write_uncommitted(objectUid,
                                     tn, newState);
                     }
                     catch (ObjectStoreException e) {
@@ -517,13 +518,13 @@
 
         boolean result = false;
 
-        if (objectStore != null)
+        if (participantStore != null)
         {
             BasicAction action = BasicAction.Current();
 
             if (action != null) // add will fail if the status is wrong!
             {
-                DisposeRecord dr = new DisposeRecord(objectStore, this);
+                DisposeRecord dr = new DisposeRecord(participantStore, this);
 
                 if (action.add(dr) != AddOutcome.AR_ADDED) {
                     dr = null;
@@ -537,7 +538,7 @@
             {
                 try
                 {
-                    result = objectStore.remove_committed(get_uid(), type());
+                    result = participantStore.remove_committed(get_uid(), type());
 
                     /*
                      * Once destroyed, we can never use the object again.
@@ -617,16 +618,16 @@
      *         state of the object to storage.
      */
 
-    public ObjectStore getStore ()
+    public ParticipantStore getStore ()
     {
         if (tsLogger.logger.isDebugEnabled()) {
             tsLogger.logger.debug("StateManager::getStore ()");
         }
 
-        if (objectStore == null)
+        if (participantStore == null)
             setupStore();
 
-        return objectStore;
+        return participantStore;
     }
 
     /**
@@ -803,7 +804,7 @@
         currentStatus = ObjectStatus.PASSIVE;
         initialStatus = ObjectStatus.PASSIVE;
         myType = ot;
-        objectStore = null;
+        participantStore = null;
         storeRoot = null;
 
         objectUid = objUid;
@@ -844,7 +845,7 @@
                 : ObjectStatus.PASSIVE_NEW);
         initialStatus = currentStatus;
         myType = ot;
-        objectStore = null;
+        participantStore = null;
         storeRoot = null;
 
         objectUid = new Uid();
@@ -927,7 +928,7 @@
                     record = new RecoveryRecord(state, this);
                 }
                 else
-                    record = new PersistenceRecord(state, objectStore, this);
+                    record = new PersistenceRecord(state, participantStore, this);
 
                 if ((rStatus = action.add(record)) != AddOutcome.AR_ADDED)
                 {
@@ -1046,7 +1047,7 @@
 
                             setupStore(storeRoot);
 
-                            record = new CadaverRecord(state, objectStore, this);
+                            record = new CadaverRecord(state, participantStore, this);
 
                             if ((rStatus = action.add(record)) != AddOutcome.AR_ADDED)
                                 record = null;
@@ -1136,7 +1137,7 @@
          * Already setup? Assume type will not change once object is created.
          */
 
-        if (objectStore != null)
+        if (participantStore != null)
             return;
 
         if (rootName == null)
@@ -1157,7 +1158,7 @@
 
             /* No - destroy old store and create new */
 
-            objectStore = null;
+            participantStore = null;
         }
 
         if (rootName == null)
@@ -1175,22 +1176,7 @@
             int sharedStatus = ((objectModel == ObjectModel.SINGLE) ? StateType.OS_UNSHARED
                     : StateType.OS_SHARED);
 
-            arjPropertyManager.getObjectStoreEnvironmentBean().setShare(
-                    sharedStatus);
-            arjPropertyManager.getObjectStoreEnvironmentBean().setLocalOSRoot(
-                    storeRoot);
-
-            try
-            {
-                Class osc = Class.forName(objectStoreType);
-
-                objectStore = (ObjectStore) osc.newInstance();
-            }
-            catch (final Throwable ex)
-            {
-                throw new FatalError(tsLogger.i18NLogger.get_StateManager_16()
-                        + " " + objectStoreType);
-            }
+            participantStore = StoreManager.setupStore(rootName, sharedStatus);
         }
         else {
             /*
@@ -1203,18 +1189,10 @@
 
             throw new FatalError(tsLogger.i18NLogger.get_StateManager_14());
 
-            // objectStore = new
+            // participantStore = new
             // ObjectStore(ArjunaNames.Implementation_ObjectStore_VolatileStore
             // (), storeRoot);
         }
-
-        /*
-         * Do any work needed to initialise the object store. Really only makes
-         * sense for replicated object store where we attempt to do early
-         * binding to the replicas.
-         */
-
-        objectStore.initialise(get_uid(), type());
     }
 
     /**
@@ -1422,7 +1400,7 @@
 
     private int myType;
 
-    private ObjectStore objectStore;
+    private ParticipantStore participantStore;
 
     private String storeRoot;
 

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/BasicAction.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/BasicAction.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/BasicAction.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -35,8 +35,9 @@
 
 import com.arjuna.ats.arjuna.*;
 import com.arjuna.ats.arjuna.common.*;
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.state.*;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
 import com.arjuna.ats.arjuna.utils.ThreadUtil;
 import com.arjuna.ats.arjuna.utils.Utility;
 import com.arjuna.ats.internal.arjuna.Header;
@@ -74,7 +75,7 @@
 		heuristicList = null;
 
 		currentHierarchy = null;
-		currentStore = null;
+		participantStore = null;
 		savedIntentionList = false;
 
 		actionStatus = ActionStatus.CREATED;
@@ -111,7 +112,7 @@
 		heuristicList = null;
 
 		currentHierarchy = null;
-		currentStore = null;
+		participantStore = null;
 		savedIntentionList = false;
 
 		actionStatus = ActionStatus.CREATED;
@@ -198,7 +199,7 @@
 		failedList = null;
 		heuristicList = null;
 
-		currentStore = null;
+		participantStore = null;
 		currentHierarchy = null;
 
 		_checkedAction = null;
@@ -376,27 +377,22 @@
 	}
 
 	/**
-	 * Set up an object store and assign it to the currentStore variable.
+	 * Set up an object store and assign it to the participantStore variable.
 	 * 
 	 * @return the object store implementation to use.
 	 * @see com.arjuna.ats.arjuna.objectstore.ObjectStore
 	 */
 
-	public ObjectStore getStore ()
+	public ParticipantStore getStore ()
 	{
-		if (currentStore == null)
+		if (participantStore == null)
 		{
-			currentStore = TxControl.getStore();
+			participantStore = StoreManager.getParticipantStore();
 		}
 
-		return currentStore;
+		return participantStore;
 	}
 
-	public final ObjectStore store ()
-	{
-		return getStore();
-	}
-
 	/**
 	 * The following function returns the Uid of the top-level atomic action. If
 	 * this is the top-level transaction then it is equivalent to calling
@@ -463,7 +459,7 @@
 		boolean restored = false;
 
 		// Set up store
-		ObjectStore aaStore = store();
+		ParticipantStore aaStore = getStore();
 
 		if (aaStore == null)
 			return false;
@@ -520,7 +516,7 @@
 		boolean deactivated = false;
 
 		// Set up store
-		ObjectStore aaStore = store();
+		ParticipantStore aaStore = getStore();
 
 		if (aaStore == null)
 			return false;
@@ -1639,7 +1635,7 @@
 		heuristicList = null;
 
 		currentHierarchy = null;
-		currentStore = null;
+		participantStore = null;
 		savedIntentionList = false;
 
 		actionStatus = ActionStatus.CREATED;
@@ -1669,7 +1665,7 @@
 		heuristicList = null;
 
 		currentHierarchy = null;
-		currentStore = null;
+		participantStore = null;
 		savedIntentionList = false;
 
 		actionStatus = ActionStatus.CREATED;
@@ -1964,7 +1960,7 @@
 
 		if (actionType == ActionType.TOP_LEVEL)
 		{
-			if (store() == null)
+			if (getStore() == null)
 			{
 				actionStatus = ActionStatus.ABORT_ONLY;
 
@@ -2219,7 +2215,7 @@
 			{
 				try
 				{
-					if (!currentStore.write_committed(u, tn, state)) {
+					if (!participantStore.write_committed(u, tn, state)) {
                         tsLogger.i18NLogger.warn_coordinator_BasicAction_46(get_uid());
 
                         criticalEnd();
@@ -2387,7 +2383,7 @@
 		{			
 			if (stateToSave && ((heuristicList.size() > 0) || (failedList.size() > 0)))
 			{
-				if (store() == null)
+				if (getStore() == null)
 				{
 					tsLogger.i18NLogger.fatal_coordinator_BasicAction_48();
 
@@ -3117,7 +3113,7 @@
 			 * action.
 			 */
 
-			store();
+			getStore();
 
 			/*
 			 * If we have failures then rewrite the intentions list. Otherwise,
@@ -3148,7 +3144,7 @@
 				{
 					try
 					{
-						if (!currentStore.write_committed(u, tn, state)) {
+						if (!participantStore.write_committed(u, tn, state)) {
                             tsLogger.i18NLogger.warn_coordinator_BasicAction_65();
                         }
 					}
@@ -3164,7 +3160,7 @@
 				{
 					if (savedIntentionList)
 					{						
-						if (currentStore.remove_committed(getSavingUid(), type()))
+						if (participantStore.remove_committed(getSavingUid(), type()))
 						{
 							savedIntentionList = false;
 						}
@@ -3576,7 +3572,7 @@
 	protected boolean savedIntentionList;
 	
 	private ActionHierarchy currentHierarchy;
-	private ObjectStore currentStore;
+	private ParticipantStore participantStore;
 
 	//    private boolean savedIntentionList;
 

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/TxControl.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/TxControl.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/TxControl.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -33,12 +33,8 @@
 
 import com.arjuna.ats.arjuna.logging.tsLogger;
 import com.arjuna.ats.arjuna.common.arjPropertyManager;
-import com.arjuna.ats.arjuna.exceptions.FatalError;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
-import com.arjuna.ats.arjuna.objectstore.StateType;
 import com.arjuna.ats.arjuna.recovery.TransactionStatusManager;
 import com.arjuna.ats.arjuna.utils.Utility;
-import com.arjuna.ats.internal.arjuna.objectstore.LogStore;
 
 /**
  * Transaction configuration object. We have a separate object for this so that
@@ -142,120 +138,13 @@
 	{
 		return TxControl.enable;
 	}
-
-	public static final String getActionStoreType()
-	{
-		return actionStoreType;
-	}
-
-	/**
-         * By default we should use the same store as the coordinator. However, there
-         * may be some ObjectStore implementations that preclude this and in which
-         * case we will default to the basic action store since performance is not
-         * an issue.
-         * 
-         * @return the <code>ObjectStore</code> implementation which the
-         * recovery manager uses.
-         * 
-         * @see com.arjuna.ats.arjuna.objectstore.ObjectStore
-         */
         
-        @SuppressWarnings("unchecked")
-        public static final ObjectStore getRecoveryStore ()
-        {
-            if (_recoveryStore != null)
-                return _recoveryStore;
-            
-            if (TxControl.actionStoreType == null)
-            {
-                    if (arjPropertyManager.getCoordinatorEnvironmentBean().isTransactionLog())
-                            TxControl.actionStoreType = LogStore.class.getName();
-                    else
-                            TxControl.actionStoreType = arjPropertyManager.getCoordinatorEnvironmentBean().getActionStore();
-
-                sharedTransactionLog = arjPropertyManager.getCoordinatorEnvironmentBean().isSharedTransactionLog();
-            }
-
-            String recoveryType = TxControl.actionStoreType;
-            
-            if (TxControl.actionStoreType.equals(LogStore.class.getName()))
-                recoveryType = arjPropertyManager.getCoordinatorEnvironmentBean().getActionStore();
-            
-            /*
-             * Defaults to ObjectStore.OS_UNSHARED
-             */
-
-            if (sharedTransactionLog)
-                arjPropertyManager.getObjectStoreEnvironmentBean().setShare(StateType.OS_SHARED);
-            
-            try
-            {
-                Class osc = Class.forName(recoveryType);
-                
-                _recoveryStore = (ObjectStore) osc.newInstance();
-            }
-            catch (final Throwable ex)
-            {
-                throw new FatalError(tsLogger.i18NLogger.get_coordinator_invalidos() + " "+recoveryType);
-            }
-            
-            return _recoveryStore;
-        }
-        
 	/**
 	 * @return the <code>ObjectStore</code> implementation which the
 	 *         transaction coordinator will use.
 	 * @see com.arjuna.ats.arjuna.objectstore.ObjectStore
 	 */
 
-	@SuppressWarnings("unchecked")
-    public static final ObjectStore getStore()
-	{
-        if(_objectStore != null) {
-            return _objectStore;
-        }
-
-		/*
-		 * Check for action store once per application. The second parameter is
-		 * the default value, which is returned if no other value is specified.
-		 */
-
-		if (TxControl.actionStoreType == null)
-		{
-			if (arjPropertyManager.getCoordinatorEnvironmentBean().isTransactionLog())
-				TxControl.actionStoreType = LogStore.class.getName();
-			else
-				TxControl.actionStoreType = arjPropertyManager.getCoordinatorEnvironmentBean().getActionStore();
-
-            sharedTransactionLog = arjPropertyManager.getCoordinatorEnvironmentBean().isSharedTransactionLog();
-		}
-
-		/*
-		 * Defaults to ObjectStore.OS_UNSHARED
-		 *
-		 * yes, it's unsynchronized. It does not matter much if we create more than once, we just want best
-		 * effort to avoid doing so on every call as it's a little bit expensive.
-		 */
-
-		if (sharedTransactionLog)
-	            arjPropertyManager.getObjectStoreEnvironmentBean().setShare(StateType.OS_SHARED);
-	        
-	        try
-	        {
-	            Class osc = Class.forName(actionStoreType);
-	            
-	            _objectStore = (ObjectStore) osc.newInstance();
-	        }
-	        catch (final Throwable ex)
-	        {
-	            ex.printStackTrace();
-	            
-	            throw new FatalError(tsLogger.i18NLogger.get_coordinator_invalidos() + " "+actionStoreType);
-	        }
-
-        return _objectStore;
-	}
-
 	public static final boolean getAsyncPrepare()
 	{
 		return asyncPrepare;
@@ -333,10 +222,6 @@
 
 	static boolean readonlyOptimisation = true;
 
-	static boolean sharedTransactionLog = false;
-
-	static int numberOfTransactions = 100;
-
     /**
      * flag which is true if transaction service is enabled and false if it is disabled
      */
@@ -344,10 +229,6 @@
 
 	private static TransactionStatusManager transactionStatusManager = null;
 
-	static String actionStoreType = null;
-    private static ObjectStore _objectStore = null;
-    private static ObjectStore _recoveryStore = null;
-
 	static byte[] xaNodeName = null;
 
 	static int _defaultTimeout = 60; // 60 seconds

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/logging/arjunaI18NLogger.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/logging/arjunaI18NLogger.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/logging/arjunaI18NLogger.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -52,9 +52,9 @@
 	@LogMessage(level = WARN)
 	public void warn_CadaverRecord_1(Uid arg0, String arg1);
 
-	@Message(id = 12004, value = "DisposeRecord::save_state - type of store is unknown", format = MESSAGE_FORMAT)
-	@LogMessage(level = WARN)
-	public void warn_DisposeRecord_1();
+//	@Message(id = 12004, value = "DisposeRecord::save_state - type of store is unknown", format = MESSAGE_FORMAT)
+//	@LogMessage(level = WARN)
+//	public void warn_DisposeRecord_1();
 
 	@Message(id = 12005, value = "DisposeRecord::save_state - failed", format = MESSAGE_FORMAT)
 	@LogMessage(level = WARN)
@@ -64,9 +64,9 @@
 	@LogMessage(level = WARN)
 	public void warn_DisposeRecord_3();
 
-	@Message(id = 12007, value = "DisposeRecord::restore_state - invalid store type {0}", format = MESSAGE_FORMAT)
-	@LogMessage(level = WARN)
-	public void warn_DisposeRecord_4(String arg0);
+//	@Message(id = 12007, value = "DisposeRecord::restore_state - invalid store type {0}", format = MESSAGE_FORMAT)
+//	@LogMessage(level = WARN)
+//	public void warn_DisposeRecord_4(String arg0);
 
 	@Message(id = 12008, value = "DisposeRecord::topLevelCommit - exception while deleting state", format = MESSAGE_FORMAT)
 	@LogMessage(level = WARN)
@@ -76,9 +76,9 @@
 	@LogMessage(level = WARN)
 	public void warn_PersistenceRecord_10();
 
-	@Message(id = 12010, value = "PersistenceRecord::save_state - type of store is unknown", format = MESSAGE_FORMAT)
-	@LogMessage(level = WARN)
-	public void warn_PersistenceRecord_11();
+//	@Message(id = 12010, value = "PersistenceRecord::save_state - type of store is unknown", format = MESSAGE_FORMAT)
+//	@LogMessage(level = WARN)
+//	public void warn_PersistenceRecord_11();
 
 	@Message(id = 12011, value = "PersistenceRecord::save_state - packing top level state failed", format = MESSAGE_FORMAT)
 	@LogMessage(level = WARN)
@@ -170,8 +170,8 @@
 	@Message(id = 12033, value = "Invalid object state.", format = MESSAGE_FORMAT)
 	public String get_StateManager_15();
 
-	@Message(id = 12034, value = "Invalid object store type:", format = MESSAGE_FORMAT)
-	public String get_StateManager_16();
+//	@Message(id = 12034, value = "Invalid object store type:", format = MESSAGE_FORMAT)
+//	public String get_StateManager_16();
 
 	@Message(id = 12035, value = "Activate of object with id = {0} and type {1} unexpectedly failed", format = MESSAGE_FORMAT)
 	@LogMessage(level = WARN)
@@ -567,8 +567,8 @@
 //	@LogMessage(level = WARN)
 //	public void warn_coordinator_checkedactionfactory(String arg0);
 
-	@Message(id = 12135, value = "Could not create ObjectStore type:", format = MESSAGE_FORMAT)
-    public String get_coordinator_invalidos();
+	@Message(id = 12135, value = "Could not create Store type:", format = MESSAGE_FORMAT)
+    public String get_StoreManager_invalidtype();
 
 	@Message(id = 12136, value = "Could not recreate abstract record {0}", format = MESSAGE_FORMAT)
 	@LogMessage(level = WARN)
@@ -1430,7 +1430,10 @@
     @Message(id = 12362, value = "Failed to create StateManagerWrapper", format = MESSAGE_FORMAT)
     @LogMessage(level = INFO)
     public void info_osb_StateManagerWrapperFail(Throwable arg0);
-    
+
+    @Message(id = 12363, value = "Invalid rootName. Expected {0} but was {1}", format = MESSAGE_FORMAT)
+    public String get_StoreManager_invalidroot(String arg0, String arg1);
+
     /*
         Allocate new messages directly above this notice.
           - id: use the next id number in numeric sequence. Don't reuse ids.

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/logging/arjunaI18NLoggerImpl.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/logging/arjunaI18NLoggerImpl.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/logging/arjunaI18NLoggerImpl.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -531,7 +531,7 @@
 		logger.logv(WARN, "ARJUNA-12132 Supplied name of node contains reserved character '-'. Using {0}", arg0);
 	}
 
-	public String get_coordinator_invalidos() {
+	public String get_StoreManager_invalidtype() {
 		return "ARJUNA-12135 Could not create ObjectStore type:";
 	}
 
@@ -1120,7 +1120,6 @@
 	}
 
 	public void info_recovery_PeriodicRecovery_13(String arg0, String arg1) {
-        System.out.println("jjh1");
 		logger.logv(INFO, "ARJUNA-12310 Recovery manager listening on endpoint {0}:{1}", arg0, arg1);
 	}
 
@@ -1308,5 +1307,8 @@
 		logger.logv(INFO, arg0, "ARJUNA-12362 Failed to create StateManagerWrapper", (Object)null);
 	}
 
+    public String get_StoreManager_invalidroot(String arg0, String arg1) {
+        return MessageFormat.format("Invalid rootName. Expected {0} but was {1}", arg0, arg1);
+    }
 
 }

Copied: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/BaseStore.java (from rev 33155, labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/BaseStore.java)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/BaseStore.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/BaseStore.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 1998, 1999, 2000, 2001,
+ *
+ * Arjuna Solutions Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.  
+ *
+ * $Id: ObjectStore.java 2342 2006-03-30 13:06:17Z  $
+ */
+
+package com.arjuna.ats.arjuna.objectstore;
+
+/**
+ * The BasicStore provides core methods that all implementations MUST provide.
+ *
+ * @author Mark Little (mark at arjuna.com)
+ * @version $Id: ObjectStore.java 2342 2006-03-30 13:06:17Z  $
+ * @since JTS 1.0.
+ */
+
+public interface BaseStore
+{
+    /**
+     * The type of the object store. This is used to order the
+     * instances in the intentions list.
+     *
+     * @return the type of the record.
+     * @see com.arjuna.ats.arjuna.coordinator.RecordType
+     */
+
+    public int typeIs ();
+
+    /**
+     * @return the "name" of the object store. Where in the hierarchy it appears, e.g., /ObjectStore/MyName/...
+     */
+
+    public String getStoreName ();
+}
+

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/ObjectStore.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/ObjectStore.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/ObjectStore.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -57,203 +57,14 @@
  * @since JTS 1.0.
  */
 
-// TODO may make this class private when we refactor in terms of templates
-
-public abstract class ObjectStore
+public abstract class ObjectStore implements ObjectStoreAPI
 {
-    /*
-     * Transactional participants MUST use the following methods. It allows
-     * them to be driven through 2PC.
-     */
-    
-    /**
-     * Commit the object's state in the object store.
-     *
-     * @param u The object to work on.
-     * @param tn The type of the object to work on.
-     *
-     * @return <code>true</code> if no errors occurred, <code>false</code>
-     * otherwise.
-     */
-
-    public abstract boolean commit_state (Uid u, String tn) throws ObjectStoreException;
-
-    /**
-     * Read the object's shadowed state.
-     *
-     * @param u The object to work on.
-     * @param tn The type of the object to work on.
-     *
-     * @return the state of the object.
-     */
-
-    public abstract InputObjectState read_uncommitted (Uid u, String tn) throws ObjectStoreException;
-
-    /**
-     * Remove the object's uncommitted state.
-     *
-     * @param u The object to work on.
-     * @param tn The type of the object to work on.
-     *
-     * @return <code>true</code> if no errors occurred, <code>false</code>
-     * otherwise.
-     */
-
-    public abstract boolean remove_uncommitted (Uid u, String tn) throws ObjectStoreException;
-
-    /**
-     * Write a copy of the object's uncommitted state.
-     *
-     * @param u The object to work on.
-     * @param tn The type of the object to work on.
-     * @param buff The state to write.
-     *
-     * @return <code>true</code> if no errors occurred, <code>false</code>
-     * otherwise.
-     */
-
-    public abstract boolean write_uncommitted (Uid u, String tn, OutputObjectState buff) throws ObjectStoreException;
-   
-    /*
-     * All ObjectStore implementations that are used to drive recovery
-     * MUST use the following methods.
-     */
-    
-    /**
-     * Obtain all of the Uids for a specified type.
-     *
-     * @param s The type to scan for.
-     * @param buff The object state in which to store the Uids
-     * @param m The file type to look for (e.g., committed, shadowed). [StateStatus]
-     *
-     * @return <code>true</code> if no errors occurred, <code>false</code>
-     * otherwise.
-     */
-
-    public abstract boolean allObjUids (String s, InputObjectState buff, int m) throws ObjectStoreException;
-    
-    /**
-     * Obtain all of the Uids for all states of the specified type.
-     *
-     * @param s The type to scan for.
-     * @param buff The object state in which to store the Uids
-     *
-     * @return <code>true</code> if no errors occurred, <code>false</code>
-     * otherwise.
-     */
-    
     public boolean allObjUids (String s, InputObjectState buff) throws ObjectStoreException
     {
         return allObjUids(s, buff, StateStatus.OS_UNKNOWN);
     }
-    
-    /**
-     * Obtain all types of objects stored in the object store.
-     *
-     * @param buff The state in which to store the types.
-     *
-     * @return <code>true</code> if no errors occurred, <code>false</code>
-     * otherwise.
-     */
 
-    public abstract boolean allTypes (InputObjectState buff) throws ObjectStoreException;
-
     /**
-     * @param u The object to query.
-     * @param tn The type of the object to query.
-     *
-     * @return the current state of the object's state (e.g., shadowed,
-     * committed ...) [StateStatus]
-     */
-
-    public abstract int currentState (Uid u, String tn) throws ObjectStoreException;
-
-    /**
-     * Hide the object's state in the object store. Used by crash
-     * recovery.
-     *
-     * @param u The object to work on.
-     * @param tn The type of the object to work on.
-     *
-     * @return <code>true</code> if no errors occurred, <code>false</code>
-     * otherwise.
-     */
-
-    public abstract boolean hide_state (Uid u, String tn) throws ObjectStoreException;
-
-    /**
-     * Reveal a hidden object's state.
-     *
-     * @param u The object to work on.
-     * @param tn The type of the object to work on.
-     *
-     * @return <code>true</code> if no errors occurred, <code>false</code>
-     * otherwise.
-     */
-
-    public abstract boolean reveal_state (Uid u, String tn) throws ObjectStoreException;
-
-    /**
-     * Read the object's committed state.
-     *
-     * @param u The object to work on.
-     * @param tn The type of the object to work on.
-     *
-     * @return the state of the object.
-     */
-
-    public abstract InputObjectState read_committed (Uid u, String tn) throws ObjectStoreException;
-    
-    /*
-     * Core transaction log methods.
-     */
-    
-    /**
-     * Remove the object's committed state.
-     *
-     * @param u The object to work on.
-     * @param tn The type of the object to work on.
-     *
-     * @return <code>true</code> if no errors occurred, <code>false</code>
-     * otherwise.
-     */
-
-    public abstract boolean remove_committed (Uid u, String tn) throws ObjectStoreException;
-
-    /**
-     * Write a new copy of the object's committed state.
-     *
-     * @param u The object to work on.
-     * @param tn The type of the object to work on.
-     * @param buff The state to write.
-     *
-     * @return <code>true</code> if no errors occurred, <code>false</code>
-     * otherwise.
-     */
-
-    public abstract boolean write_committed (Uid u, String tn, OutputObjectState buff) throws ObjectStoreException;
-    
-    /*
-     * The following methods are core to all implementations.
-     */
-    
-    /**
-     * The type of the object store. This is used to order the
-     * instances in the intentions list.
-     *
-     * @return the type of the record.
-     * @see com.arjuna.ats.arjuna.coordinator.RecordType
-     */
-
-    public abstract int typeIs ();
-
-    /**
-     * @return the "name" of the object store. Where in the hierarchy it appears, e.g., /ObjectStore/MyName/...
-     */
-
-    public abstract String getStoreName ();
-
-    /**
      * Some object store implementations may be running with automatic
      * sync disabled. Calling this method will ensure that any states are
      * flushed to disk.
@@ -344,28 +155,10 @@
      * Initialise the object store.
      */
 
-    public void initialise (Uid u, String tn)
+    public final void initialise (Uid u, String tn)
     {
     }
 
-    /**
-     * Pack up the object store state. May be used to ship an entire
-     * object store across the network, or persist a volatile object
-     * store.
-     */
-
-    public void pack (OutputBuffer buff) throws IOException
-    {
-    }
-
-    /**
-     * Unpack an object store.
-     */
-
-    public void unpack (InputBuffer buff) throws IOException
-    {
-    }
-
     public final int shareState ()
     {
         return shareStatus;

Added: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/ObjectStoreAPI.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/ObjectStoreAPI.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/ObjectStoreAPI.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -0,0 +1,12 @@
+package com.arjuna.ats.arjuna.objectstore;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: jhalli
+ * Date: Jul 6, 2010
+ * Time: 5:51:04 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface ObjectStoreAPI extends ParticipantStore, RecoveryStore
+{
+}

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/ObjectStoreIterator.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/ObjectStoreIterator.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/ObjectStoreIterator.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -47,11 +47,11 @@
 public class ObjectStoreIterator
 {
 
-    public ObjectStoreIterator(ObjectStore store, String tName)
+    public ObjectStoreIterator(RecoveryStore recoveryStore, String tName)
     {
         try
         {
-            store.allObjUids(tName, uidList);
+            recoveryStore.allObjUids(tName, uidList);
         }
         catch (ObjectStoreException e)
         {

Copied: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/ParticipantStore.java (from rev 33155, labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/ParticipantStore.java)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/ParticipantStore.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/ParticipantStore.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -0,0 +1,113 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 1998, 1999, 2000, 2001,
+ *
+ * Arjuna Solutions Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.  
+ *
+ * $Id: ObjectStore.java 2342 2006-03-30 13:06:17Z  $
+ */
+
+package com.arjuna.ats.arjuna.objectstore;
+
+import com.arjuna.ats.arjuna.common.*;
+import com.arjuna.ats.arjuna.state.*;
+
+import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
+
+import java.io.IOException;
+
+/**
+ * Transactional participants MUST use this type of ObjectStore. It allows
+ * them to be driven through 2PC.
+ *
+ * @author Mark Little (mark at arjuna.com)
+ * @version $Id: ObjectStore.java 2342 2006-03-30 13:06:17Z  $
+ * @since JTS 1.0.
+ */
+
+public interface ParticipantStore extends TxLog
+{
+    /**
+     * Commit the object's state in the object store.
+     *
+     * @param u The object to work on.
+     * @param tn The type of the object to work on.
+     *
+     * @return <code>true</code> if no errors occurred, <code>false</code>
+     * otherwise.
+     */
+
+    public boolean commit_state (Uid u, String tn) throws ObjectStoreException;
+
+    /**
+     * Read the object's committed state.
+     *
+     * @param u The object to work on.
+     * @param tn The type of the object to work on.
+     *
+     * @return the state of the object.
+     */
+
+    public InputObjectState read_committed (Uid u, String tn) throws ObjectStoreException;
+
+    /**
+     * Read the object's shadowed state.
+     *
+     * @param u The object to work on.
+     * @param tn The type of the object to work on.
+     *
+     * @return the state of the object.
+     */
+
+    public InputObjectState read_uncommitted (Uid u, String tn) throws ObjectStoreException;
+
+    /**
+     * Remove the object's uncommitted state.
+     *
+     * @param u The object to work on.
+     * @param tn The type of the object to work on.
+     *
+     * @return <code>true</code> if no errors occurred, <code>false</code>
+     * otherwise.
+     */
+
+    public boolean remove_uncommitted (Uid u, String tn) throws ObjectStoreException;
+
+    /**
+     * Write a copy of the object's uncommitted state.
+     *
+     * @param u The object to work on.
+     * @param tn The type of the object to work on.
+     * @param buff The state to write.
+     *
+     * @return <code>true</code> if no errors occurred, <code>false</code>
+     * otherwise.
+     */
+
+    public boolean write_uncommitted (Uid u, String tn, OutputObjectState buff) throws ObjectStoreException;
+
+    public boolean fullCommitNeeded ();
+}
+

Copied: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/RecoveryStore.java (from rev 33155, labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/RecoveryStore.java)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/RecoveryStore.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/RecoveryStore.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -0,0 +1,137 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 1998, 1999, 2000, 2001,
+ *
+ * Arjuna Solutions Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.  
+ *
+ * $Id: ObjectStore.java 2342 2006-03-30 13:06:17Z  $
+ */
+
+package com.arjuna.ats.arjuna.objectstore;
+
+import com.arjuna.ats.arjuna.common.*;
+import com.arjuna.ats.arjuna.state.*;
+
+import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
+
+/**
+ * All ObjectStore implementations that are used to drive recovery
+ * MUST implement this interface. Because recovery is a superset of
+ * transaction logging, those methods are also available.
+ *
+ * @author Mark Little (mark at arjuna.com)
+ * @version $Id: ObjectStore.java 2342 2006-03-30 13:06:17Z  $
+ * @since JTS 1.0.
+ */
+
+public interface RecoveryStore extends TxLog
+{
+    /**
+     * Obtain all of the Uids for a specified type.
+     *
+     * @param s The type to scan for.
+     * @param buff The object state in which to store the Uids
+     * @param m The file type to look for (e.g., committed, shadowed). [StateStatus]
+     *
+     * @return <code>true</code> if no errors occurred, <code>false</code>
+     * otherwise.
+     */
+
+    public boolean allObjUids (String s, InputObjectState buff, int m) throws ObjectStoreException;
+
+    public boolean allObjUids (String s, InputObjectState buff) throws ObjectStoreException;
+    
+    /**
+     * Obtain all types of objects stored in the object store.
+     *
+     * @param buff The state in which to store the types.
+     *
+     * @return <code>true</code> if no errors occurred, <code>false</code>
+     * otherwise.
+     */
+
+    public boolean allTypes (InputObjectState buff) throws ObjectStoreException;
+
+    /**
+     * @param u The object to query.
+     * @param tn The type of the object to query.
+     *
+     * @return the current state of the object's state (e.g., shadowed,
+     * committed ...) [StateStatus]
+     */
+
+    public int currentState (Uid u, String tn) throws ObjectStoreException;
+
+    /**
+     * Hide the object's state in the object store. Used by crash
+     * recovery.
+     *
+     * @param u The object to work on.
+     * @param tn The type of the object to work on.
+     *
+     * @return <code>true</code> if no errors occurred, <code>false</code>
+     * otherwise.
+     */
+
+    public boolean hide_state (Uid u, String tn) throws ObjectStoreException;
+
+    /**
+     * Reveal a hidden object's state.
+     *
+     * @param u The object to work on.
+     * @param tn The type of the object to work on.
+     *
+     * @return <code>true</code> if no errors occurred, <code>false</code>
+     * otherwise.
+     */
+
+    public boolean reveal_state (Uid u, String tn) throws ObjectStoreException;
+
+    /**
+     * Read the object's committed state.
+     *
+     * @param u The object to work on.
+     * @param tn The type of the object to work on.
+     *
+     * @return the state of the object.
+     */
+
+    public InputObjectState read_committed (Uid u, String tn) throws ObjectStoreException;
+
+    /**
+     * Is the current state of the object the same as that provided as the last
+     * parameter?
+     *
+     * @param u The object to work on.
+     * @param tn The type of the object.
+     * @param st The expected type of the object. [StateType]
+     *
+     * @return <code>true</code> if the current state is as expected,
+     * <code>false</code> otherwise.
+     */
+
+    public boolean isType (Uid u, String tn, int st) throws ObjectStoreException;
+}
+

Added: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/StoreManager.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/StoreManager.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/StoreManager.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -0,0 +1,153 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates,
+ * and individual contributors as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2010,
+ * @author JBoss, by Red Hat.
+ */
+package com.arjuna.ats.arjuna.objectstore;
+
+import com.arjuna.ats.arjuna.common.arjPropertyManager;
+import com.arjuna.ats.arjuna.exceptions.FatalError;
+import com.arjuna.ats.arjuna.logging.tsLogger;
+import com.arjuna.ats.internal.arjuna.objectstore.LogStore;
+
+/**
+ * Single point of control for the management of storage instances.
+ *
+ * @author Jonathan Halliday (jonathan.halliday at redhat.com) 2010-07
+ */
+public class StoreManager
+{
+    private static ObjectStoreAPI actionStore = null; // for BasicAction i.e. tx logging / recovery
+    private static ObjectStoreAPI stateStore = null; // for StateManager i.e. txoj object type store.
+
+    public StoreManager(ObjectStoreAPI actionStore, ObjectStoreAPI stateStore) {
+
+        if(StoreManager.actionStore != null || StoreManager.stateStore != null) {
+            throw new IllegalStateException("store already initialized!");
+        }
+
+        StoreManager.actionStore = actionStore;
+        StoreManager.stateStore = stateStore;
+    }
+
+    public static final RecoveryStore getRecoveryStore ()
+    {
+        return getActionStore();
+    }
+
+    public static final TxLog getTxLog() {
+        return getActionStore();
+    }
+
+    public static final ParticipantStore getParticipantStore() {
+        return getActionStore();
+    }
+
+    /**
+     * @return the <code>ObjectStore</code> implementation which the
+     *         transaction coordinator will use.
+     * @see ObjectStore
+     */
+
+    private static final ObjectStoreAPI getActionStore()
+    {
+        if(actionStore != null) {
+            return actionStore;
+        }
+
+        synchronized(StoreManager.class) {
+
+            if(actionStore != null) {
+                return actionStore;
+            }
+
+            /*
+            * Check for action store once per application. The second parameter is
+            * the default value, which is returned if no other value is specified.
+            */
+
+            String actionStoreType = null;
+
+            if (arjPropertyManager.getCoordinatorEnvironmentBean().isTransactionLog()) {
+                actionStoreType = LogStore.class.getName();
+            } else {
+                actionStoreType = arjPropertyManager.getCoordinatorEnvironmentBean().getActionStore();
+            }
+
+            // Defaults to ObjectStore.OS_UNSHARED
+
+            if (arjPropertyManager.getCoordinatorEnvironmentBean().isSharedTransactionLog()) {
+                arjPropertyManager.getObjectStoreEnvironmentBean().setShare(StateType.OS_SHARED);
+            }
+
+            try
+            {
+                Class osc = Class.forName(actionStoreType);
+
+                actionStore = (ObjectStoreAPI) osc.newInstance();
+            }
+            catch (final Throwable ex)
+            {
+                throw new FatalError(tsLogger.i18NLogger.get_StoreManager_invalidtype() + " " + actionStoreType, ex);
+            }
+        }
+
+        return actionStore;
+    }
+
+    public static ObjectStoreAPI getTxOJStore() {
+        return (ObjectStoreAPI) setupStore(null, StateType.OS_UNSHARED);
+    }
+
+    public static ParticipantStore setupStore (String rootName, int sharedStatus)
+    {
+        if(stateStore != null) {
+            return stateStore;
+        }
+
+        synchronized(StoreManager.class) {
+
+            if(stateStore != null) {
+                return stateStore;
+            }
+
+            if(sharedStatus != arjPropertyManager.getObjectStoreEnvironmentBean().getShare()) {
+                arjPropertyManager.getObjectStoreEnvironmentBean().setShare(sharedStatus);
+            }
+
+            if(rootName != null && !rootName.equals(arjPropertyManager.getObjectStoreEnvironmentBean().getLocalOSRoot())) {
+                throw new IllegalArgumentException(tsLogger.i18NLogger.get_StoreManager_invalidroot(
+                        arjPropertyManager.getObjectStoreEnvironmentBean().getLocalOSRoot(), rootName));
+            }
+
+            String storeType = arjPropertyManager.getObjectStoreEnvironmentBean().getObjectStoreType();
+
+            try {
+                Class osc = Class.forName(storeType);
+
+                stateStore = (ObjectStoreAPI) osc.newInstance();
+
+            } catch (final Throwable ex)
+            {
+                throw new FatalError(tsLogger.i18NLogger.get_StoreManager_invalidtype() + " " + storeType, ex);
+            }
+
+        }
+        return stateStore;
+    }
+}

Copied: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/TxLog.java (from rev 33155, labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/TxLog.java)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/TxLog.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/TxLog.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 1998, 1999, 2000, 2001,
+ *
+ * Arjuna Solutions Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.  
+ *
+ * $Id: ObjectStore.java 2342 2006-03-30 13:06:17Z  $
+ */
+
+package com.arjuna.ats.arjuna.objectstore;
+
+import com.arjuna.ats.arjuna.common.*;
+import com.arjuna.ats.arjuna.state.*;
+
+import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
+
+/**
+ * All transaction logs MUST implement this interface.
+ *
+ * @author Mark Little (mark at arjuna.com)
+ * @version $Id: ObjectStore.java 2342 2006-03-30 13:06:17Z  $
+ * @since JTS 1.0.
+ */
+
+public interface TxLog extends BaseStore
+{
+    /**
+     * Remove the object's committed state.
+     *
+     * @param u The object to work on.
+     * @param tn The type of the object to work on.
+     *
+     * @return <code>true</code> if no errors occurred, <code>false</code>
+     * otherwise.
+     */
+
+    public boolean remove_committed (Uid u, String tn) throws ObjectStoreException;
+
+    /**
+     * Write a new copy of the object's committed state.
+     *
+     * @param u The object to work on.
+     * @param tn The type of the object to work on.
+     * @param buff The state to write.
+     *
+     * @return <code>true</code> if no errors occurred, <code>false</code>
+     * otherwise.
+     */
+
+    public boolean write_committed (Uid u, String tn, OutputObjectState buff) throws ObjectStoreException;
+
+    /**
+     * Some object store implementations may be running with automatic
+     * sync disabled. Calling this method will ensure that any states are
+     * flushed to disk.
+     */
+
+    public void sync () throws java.io.SyncFailedException, ObjectStoreException;
+}
+

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/recovery/ActionStatusService.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/recovery/ActionStatusService.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/recovery/ActionStatusService.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -38,9 +38,9 @@
 import com.arjuna.ats.arjuna.coordinator.ActionStatus;
 import com.arjuna.ats.arjuna.coordinator.BasicAction;
 import com.arjuna.ats.arjuna.coordinator.ActionManager;
-import com.arjuna.ats.arjuna.coordinator.TxControl;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
 import com.arjuna.ats.arjuna.objectstore.StateStatus;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.state.InputObjectState;
 import com.arjuna.ats.arjuna.utils.Utility;
 
@@ -54,9 +54,9 @@
     */
    public ActionStatusService()
    {
-      if ( _objectStore == null )
+      if ( _recoveryStore == null )
       {
-         _objectStore = TxControl.getStore();
+         _recoveryStore = StoreManager.getRecoveryStore();
       }
    }
 
@@ -249,7 +249,7 @@
          InputObjectState types = new InputObjectState();
 
          // find all types
-         if ( _objectStore.allTypes(types) )
+         if ( _recoveryStore.allTypes(types) )
          {
             String theTypeName = null;
 
@@ -274,7 +274,7 @@
                      {
                         boolean endOfUids = false;
 
-                        if ( _objectStore.allObjUids( theTypeName, uids ) )
+                        if ( _recoveryStore.allObjUids( theTypeName, uids ) )
                         {
                            Uid theUid = null;
 
@@ -362,7 +362,7 @@
 
       try
       {
-         int osState = _objectStore.currentState( tranUid, transactionType );
+         int osState = _recoveryStore.currentState( tranUid, transactionType );
 
          switch ( osState )
          {
@@ -391,7 +391,7 @@
     * Reference to transaction object store.
     */
 
-   private static ObjectStore _objectStore = null;
+   private static RecoveryStore _recoveryStore = null;
 }
 
 

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/recovery/TransactionStatusConnectionManager.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/recovery/TransactionStatusConnectionManager.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/recovery/TransactionStatusConnectionManager.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -37,7 +37,8 @@
 import com.arjuna.ats.arjuna.coordinator.ActionStatus ;
 import com.arjuna.ats.arjuna.coordinator.TxControl ;
 import com.arjuna.ats.arjuna.exceptions.ObjectStoreException ;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore ;
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.state.InputObjectState ;
 import com.arjuna.ats.internal.arjuna.common.UidHelper;
 import com.arjuna.ats.internal.arjuna.recovery.TransactionStatusConnector ;
@@ -52,9 +53,9 @@
      */
     public TransactionStatusConnectionManager()
     {
-	if ( _objStore == null )
+	if ( _recoveryStore == null )
 	{
-	    _objStore = TxControl.getStore() ;
+	    _recoveryStore = StoreManager.getRecoveryStore();
 	}
 
 	updateTSMI() ;
@@ -181,7 +182,7 @@
 
 	try
 	{
-	    tsmis = _objStore.allObjUids( _typeName, uids ) ;
+	    tsmis = _recoveryStore.allObjUids( _typeName, uids ) ;
 	}
 	catch ( ObjectStoreException ex ) {
         tsLogger.i18NLogger.warn_recovery_TransactionStatusConnectionManager_2(ex);
@@ -261,7 +262,7 @@
    private Hashtable _tscTable  = new Hashtable() ;
 
     // Reference to object store.
-    private static ObjectStore _objStore = null ;
+    private static RecoveryStore _recoveryStore = null ;
 
     private static Uid _localUid = new Uid();
 }

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/OTM.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/OTM.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/OTM.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -31,9 +31,10 @@
 
 package com.arjuna.ats.arjuna.tools;
 
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.common.util.propertyservice.PropertiesFactory;
 import com.arjuna.ats.arjuna.common.*;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
 import com.arjuna.ats.arjuna.objectstore.StateStatus;
 import com.arjuna.ats.arjuna.state.*;
 import com.arjuna.ats.internal.arjuna.common.UidHelper;
@@ -219,15 +220,13 @@
 
             try
             {
-                Class actionStoreType = Class.forName(arjPropertyManager
-                        .getCoordinatorEnvironmentBean().getActionStore());
-                ObjectStore imple = (ObjectStore) actionStoreType.newInstance();
+                RecoveryStore recoveryStore = StoreManager.getRecoveryStore();
 
                 InputObjectState types = new InputObjectState();
 
                 startSweep();
 
-                if (imple.allTypes(types))
+                if (recoveryStore.allTypes(types))
                 {
                     String fullPathName = null;
                     boolean found = false;
@@ -279,7 +278,7 @@
                                 if (added)
                                     currentRoot.add(currentNode);
 
-                                if (imple.allObjUids(fullPathName, uids))
+                                if (recoveryStore.allObjUids(fullPathName, uids))
                                 {
                                     Uid theUid = new Uid(Uid.nullUid());
 
@@ -327,7 +326,7 @@
                                                         .add(new DefaultMutableTreeNode(
                                                                 new String(
                                                                         "status: "
-                                                                                + statusToString(imple
+                                                                                + statusToString(recoveryStore
                                                                                         .currentState(
                                                                                                 theUid,
                                                                                                 fullPathName)))));
@@ -462,13 +461,11 @@
 
         try
         {
-            String actionStoreType = arjPropertyManager.getCoordinatorEnvironmentBean().getActionStore();
-            Class osImple = Class.forName(actionStoreType);
-            ObjectStore imple = (ObjectStore) osImple.newInstance();
+            RecoveryStore recoveryStore = StoreManager.getRecoveryStore();
 
             InputObjectState types = new InputObjectState();
 
-            if (imple.allTypes(types))
+            if (recoveryStore.allTypes(types))
             {
                 String fullPathName = null;
                 boolean found = false;
@@ -500,7 +497,7 @@
                             currentRoot = findRoot(top, currentNode);
                             currentRoot.add(currentNode);
 
-                            if (imple.allObjUids(fullPathName, uids))
+                            if (recoveryStore.allObjUids(fullPathName, uids))
                             {
                                 Uid theUid = new Uid(Uid.nullUid());
 
@@ -523,7 +520,7 @@
                                                     .add(new DefaultMutableTreeNode(
                                                             new String(
                                                                     "status: "
-                                                                            + statusToString(imple
+                                                                            + statusToString(recoveryStore
                                                                                     .currentState(
                                                                                             theUid,
                                                                                             fullPathName)))));

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/ObjectStateQuery.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/ObjectStateQuery.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/ObjectStateQuery.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -32,8 +32,9 @@
 package com.arjuna.ats.arjuna.tools;
 
 import com.arjuna.ats.arjuna.common.*;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
 import com.arjuna.ats.arjuna.objectstore.StateStatus;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.state.*;
 import com.arjuna.ats.internal.arjuna.common.UidHelper;
 
@@ -80,15 +81,14 @@
 
         try
         {
-            Class osc = Class.forName(arjPropertyManager.getObjectStoreEnvironmentBean().getObjectStoreType());
-            ObjectStore imple = (ObjectStore) osc.newInstance();
+            RecoveryStore recoveryStore = StoreManager.getRecoveryStore();
 
             System.out.println("Status is "
-                    + imple.currentState(new Uid(uid), type));
+                    + recoveryStore.currentState(new Uid(uid), type));
 
             InputObjectState buff = new InputObjectState();
 
-            imple.allObjUids(type, buff, StateStatus.OS_UNCOMMITTED);
+            recoveryStore.allObjUids(type, buff, StateStatus.OS_UNCOMMITTED);
 
             Uid u = UidHelper.unpackFrom(buff);
             

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/ObjectStoreMonitor.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/ObjectStoreMonitor.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/ObjectStoreMonitor.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -32,8 +32,9 @@
 package com.arjuna.ats.arjuna.tools;
 
 import com.arjuna.ats.arjuna.common.*;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
 import com.arjuna.ats.arjuna.objectstore.StateStatus;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.state.*;
 import com.arjuna.ats.internal.arjuna.common.UidHelper;
 
@@ -43,7 +44,6 @@
     @SuppressWarnings("unchecked")
     public static void main (String[] args)
     {
-        String storeImple = arjPropertyManager.getCoordinatorEnvironmentBean().getActionStore();
         String root = null;
 
         for (int i = 0; i < args.length; i++)
@@ -55,40 +55,31 @@
             }
             else
             {
-                if (args[i].compareTo("-store") == 0)
+                if (args[i].compareTo("-root") == 0)
                 {
-                    storeImple = args[i + 1];
+                    root = args[i + 1];
                     i++;
+
+                    arjPropertyManager.getObjectStoreEnvironmentBean().setLocalOSRoot(root);
                 }
                 else
                 {
-                    if (args[i].compareTo("-root") == 0)
-                    {
-                        root = args[i + 1];
-                        i++;
-                        
-                        arjPropertyManager.getObjectStoreEnvironmentBean().setLocalOSRoot(root);
-                    }
-                    else
-                    {
-                        System.out.println("Unknown option " + args[i]);
-                        usage();
+                    System.out.println("Unknown option " + args[i]);
+                    usage();
 
-                        System.exit(0);
-                    }
+                    System.exit(0);
                 }
             }
         }
 
         try
         {
-            Class osImple = Class.forName(storeImple);
-            ObjectStore imple = (ObjectStore) osImple.newInstance();
+            RecoveryStore recoveryStore = StoreManager.getRecoveryStore();
 
 
             InputObjectState types = new InputObjectState();
 
-            if (imple.allTypes(types))
+            if (recoveryStore.allTypes(types))
             {
                 String theName = null;
                 int count = 0;
@@ -111,7 +102,7 @@
 
                             InputObjectState uids = new InputObjectState();
 
-                            if (imple.allObjUids(theName, uids))
+                            if (recoveryStore.allObjUids(theName, uids))
                             {
                                 Uid theUid = new Uid(Uid.nullUid());
 
@@ -130,7 +121,7 @@
                                             System.out.print("\t" + theUid
                                                     + " state is ");
                                             System.out.print(StateStatus
-                                                    .stateStatusString(imple
+                                                    .stateStatusString(recoveryStore
                                                             .currentState(
                                                                     theUid,
                                                                     theName)));

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/TransactionMonitor.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/TransactionMonitor.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/TransactionMonitor.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -33,8 +33,9 @@
 
 import com.arjuna.ats.arjuna.coordinator.*;
 import com.arjuna.ats.arjuna.common.*;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
 import com.arjuna.ats.arjuna.objectstore.StateStatus;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.state.*;
 import com.arjuna.ats.internal.arjuna.common.UidHelper;
 
@@ -76,12 +77,11 @@
                 baType = baType.substring(1);
         try
         {
-            TxControl txc = new TxControl();
-            ObjectStore imple = txc.getStore();
+            RecoveryStore recoveryStore = StoreManager.getRecoveryStore();
 
             InputObjectState types = new InputObjectState();
 
-            if (imple.allTypes(types))
+            if (recoveryStore.allTypes(types))
             {
                 String theName = null;
                 int count = 0;
@@ -104,7 +104,7 @@
 
                             InputObjectState uids = new InputObjectState();
 
-                            if (imple.allObjUids(theName, uids))
+                            if (recoveryStore.allObjUids(theName, uids))
                             {
                                 Uid theUid = new Uid(Uid.nullUid());
 
@@ -121,7 +121,7 @@
                                         else
                                         {
                                             System.out.print("\t"+theUid+" state is ");
-                                            System.out.print(StateStatus.stateStatusString(imple.currentState(theUid, theName)));
+                                            System.out.print(StateStatus.stateStatusString(recoveryStore.currentState(theUid, theName)));
                                             System.out.println();
                                         }
                                     }

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/log/LogBrowser.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/log/LogBrowser.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/log/LogBrowser.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -28,6 +28,7 @@
 import com.arjuna.ats.arjuna.coordinator.TxControl;
 import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
 import com.arjuna.ats.arjuna.objectstore.ObjectStoreIterator;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.state.InputObjectState;
 import com.arjuna.ats.internal.arjuna.common.UidHelper;
 import com.arjuna.ats.internal.arjuna.tools.log.EditableAtomicAction;
@@ -343,7 +344,7 @@
         
         try
         {
-            if (TxControl.getStore().allObjUids(type, buff))
+            if (StoreManager.getRecoveryStore().allObjUids(type, buff))
             {
                 Uid u = null;
 
@@ -372,7 +373,7 @@
         if (id.equals(Uid.nullUid()))
             return false;
 
-        ObjectStoreIterator iter = new ObjectStoreIterator(TxControl.getStore(), _transactionType);
+        ObjectStoreIterator iter = new ObjectStoreIterator(StoreManager.getRecoveryStore(), _transactionType);
         Uid u;
 
         do

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/osb/mbean/ActionBean.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/osb/mbean/ActionBean.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/osb/mbean/ActionBean.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -8,6 +8,7 @@
 import com.arjuna.ats.arjuna.coordinator.RecordList;
 import com.arjuna.ats.arjuna.coordinator.TxControl;
 import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.tools.osb.util.JMXServer;
 
 import java.lang.reflect.Constructor;
@@ -50,7 +51,7 @@
 		}
 
 		ra.activate();
-		sminfo = new StateManagerWrapper(TxControl.getStore(), getUid(), getType());
+		sminfo = new StateManagerWrapper(StoreManager.getRecoveryStore(), getUid(), getType());
 
 		if (isJTS) {
 			/*
@@ -94,7 +95,7 @@
 	 */
 	public String remove() {
 		try {
-			if (!TxControl.getStore().remove_committed(getUid(), getType()))
+			if (!StoreManager.getRecoveryStore().remove_committed(getUid(), getType()))
 				return "remove committed failed"; // TODO com.arjuna.ats.arjuna.tools.osb.mbean.m_1
 			else
 				w.probe();

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/osb/mbean/ObjStoreBrowser.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/osb/mbean/ObjStoreBrowser.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/osb/mbean/ObjStoreBrowser.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -9,6 +9,7 @@
 import com.arjuna.ats.arjuna.coordinator.TxControl;
 import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
 import com.arjuna.ats.arjuna.objectstore.ObjectStoreIterator;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.state.InputObjectState;
 import com.arjuna.ats.arjuna.tools.osb.util.JMXServer;
 
@@ -173,7 +174,7 @@
 		InputObjectState types = new InputObjectState();
 
 		try {
-			if (TxControl.getStore().allTypes(types)) {
+			if (StoreManager.getRecoveryStore().allTypes(types)) {
 				String tname;
 
 				do {
@@ -221,7 +222,7 @@
 	}
 
 	private void updateMBeans(List<UidWrapper> uids, long tstamp, boolean register, String type, String thandler) {
-		ObjectStoreIterator iter = new ObjectStoreIterator(TxControl.getStore(), type);
+		ObjectStoreIterator iter = new ObjectStoreIterator(StoreManager.getRecoveryStore(), type);
 
 		while (true) {
 			Uid u = iter.iterate();

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/osb/mbean/StateManagerWrapper.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/osb/mbean/StateManagerWrapper.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/osb/mbean/StateManagerWrapper.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -4,7 +4,7 @@
 import com.arjuna.ats.arjuna.StateManager;
 import com.arjuna.ats.arjuna.common.Uid;
 import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
 import com.arjuna.ats.arjuna.state.InputObjectState;
 
 import java.io.IOException;
@@ -20,7 +20,7 @@
 	Uid processUid = Uid.nullUid();
 	long birthDate = -1;
 
-	public StateManagerWrapper(ObjectStore os, Uid uid, String type) {
+	public StateManagerWrapper(RecoveryStore os, Uid uid, String type) {
 		super(uid);
 
         try {

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/TxLogWritePersistenceRecord.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/TxLogWritePersistenceRecord.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/TxLogWritePersistenceRecord.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -50,9 +50,9 @@
 public class TxLogWritePersistenceRecord extends PersistenceRecord
 {
 
-    public TxLogWritePersistenceRecord (OutputObjectState state, ObjectStore store, StateManager sm)
+    public TxLogWritePersistenceRecord (OutputObjectState state, ParticipantStore participantStore, StateManager sm)
     {
-	super(state, store, sm);
+	super(state, participantStore, sm);
     }
     
     public int typeIs ()
@@ -81,13 +81,13 @@
 	    writeToLog = false;
 	}
 	
-	if (store != null)
+	if (targetParticipantStore != null)
 	{
 	    try
 	    {
 		if (shadowMade)
 		{
-		    result = store.commit_state(order(), super.getTypeOfObject());
+		    result = targetParticipantStore.commit_state(order(), super.getTypeOfObject());
 			    
 		    if (!result) {
                 tsLogger.i18NLogger.warn_PersistenceRecord_2(order());
@@ -98,7 +98,7 @@
 		    if (topLevelState != null)
 		    {
 			if (!writeToLog)
-			    result = store.write_committed(order(), super.getTypeOfObject(), topLevelState);
+			    result = targetParticipantStore.write_committed(order(), super.getTypeOfObject(), topLevelState);
 			else
 			    result = true;
 		    }
@@ -153,11 +153,11 @@
 	    writeToLog = false;
 	}
 	
-	if ((sm != null) && (store != null))
+	if ((sm != null) && (targetParticipantStore != null))
 	{
 	    topLevelState = new OutputObjectState(sm.get_uid(), sm.type());
 	    
-	    if (writeToLog || (!store.fullCommitNeeded() &&
+	    if (writeToLog || (!targetParticipantStore.fullCommitNeeded() &&
 			       (sm.save_state(topLevelState, ObjectType.ANDPERSISTENT)) &&
 			       (topLevelState.size() <= PersistenceRecord.MAX_OBJECT_SIZE)))
 	    {
@@ -173,7 +173,7 @@
 		    
 		    try
 		    {
-			store.write_uncommitted(sm.get_uid(), sm.type(), dummy);
+			targetParticipantStore.write_uncommitted(sm.get_uid(), sm.type(), dummy);
 			result = TwoPhaseOutcome.PREPARE_OK;
 		    }
 		    catch (ObjectStoreException e) {
@@ -189,7 +189,7 @@
 	    }
 	    else
 	    {
-		if (sm.deactivate(store.getStoreName(), false))
+		if (sm.deactivate(targetParticipantStore.getStoreName(), false))
 		{
  		    shadowMade = true;
 		    

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/abstractrecords/CadaverRecord.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/abstractrecords/CadaverRecord.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/abstractrecords/CadaverRecord.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -35,7 +35,7 @@
 import com.arjuna.ats.arjuna.logging.tsLogger;
 
 import com.arjuna.ats.arjuna.coordinator.*;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
 import com.arjuna.ats.arjuna.state.*;
 import java.io.PrintWriter;
 
@@ -45,7 +45,7 @@
  * Cadaver records are created whenever a persistent object is deleted while
  * still in the scope of an atomic action. This ensures that if the
  * action commits the state of the persistent objects gets properly
- * reflected back in the object store. For objects that are only
+ * reflected back in the object participantStore. For objects that are only
  * recoverable such work is unnecessary. Cadaver records replace
  * PersistenceRecords in the record list of an atomic action so they must
  * be merged with such records to enable both commits and aborts to occur.
@@ -63,35 +63,20 @@
      *
      * @param os the state of the object that is being
      * removed.
-     * @param objStore the object store instance used to manipulate the
+     * @param participantStore the object participantStore instance used to manipulate the
      * persistent state.
      * @param sm the object being removed.
      */
 
-    public CadaverRecord (OutputObjectState os, ObjectStore objStore,
+    public CadaverRecord (OutputObjectState os, ParticipantStore participantStore,
 			  StateManager sm)
     {
-	super(os, objStore, sm);
+	super(os, participantStore, sm);
 
 	newStateIsValid = ((os != null) ? true : false);
 	oldState = null;
 	oType = RecordType.NONE_RECORD;
-	store = objStore;  // implicit ref count in Java
 
-	if (store != null)
-	{
-	    /*
-	     * If the object goes out of scope its object store may
-	     * be inaccessable - increase reference count to compensate
-	     */
-
-	    /*
-	     * Don't need this in Java.
-	     */
-
-	    //	    ObjectStore.reference(store);
-	}
-
 	if (tsLogger.logger.isDebugEnabled()) {
         tsLogger.logger.debug("CadaverRecord::CadaverRecord(" + os + ", " + sm.get_uid() + ")");
     }
@@ -194,9 +179,9 @@
 
     /**
      * At topLevelCommit we commit the uncommitted version already saved
-     * into object store.
+     * into object participantStore.
      * Cannot use inherited version since that assumes object is alive
-     * instead talk directly to the object store itself.
+     * instead talk directly to the object participantStore itself.
      */
 
     public int topLevelCommit ()
@@ -210,12 +195,12 @@
 
 	if ((oState != null) && (oType == RecordType.PERSISTENCE))
 	{
-	    if (store == null)
+	    if (targetParticipantStore == null)
 		return TwoPhaseOutcome.FINISH_ERROR;
 
 	    try
 	    {
-		res = store.commit_state(oState.stateUid(), oState.type());
+		res = targetParticipantStore.commit_state(oState.stateUid(), oState.type());
 	    }
 	    catch (ObjectStoreException e)
 	    {
@@ -229,9 +214,9 @@
     }
 
     /**
-     * At topLevelPrepare write uncommitted version into object store.
+     * At topLevelPrepare write uncommitted version into object participantStore.
      * Cannot use inherited version since that assumes object is alive
-     * instead talk directly to the object store itself.
+     * instead talk directly to the object participantStore itself.
      */
 
     public int topLevelPrepare ()
@@ -247,12 +232,12 @@
 	{
 	    if (oType == RecordType.PERSISTENCE)
 	    {
-		if (store == null)
+		if (targetParticipantStore == null)
 		    return TwoPhaseOutcome.PREPARE_NOTOK;
 
 		try
 		{
-		    if (store.write_uncommitted(oState.stateUid(), oState.type(), oState))
+		    if (targetParticipantStore.write_uncommitted(oState.stateUid(), oState.type(), oState))
 		    {
 			if (shadowForced())
 			    tlpOk = TwoPhaseOutcome.PREPARE_OK;
@@ -285,7 +270,7 @@
 
     /**
      * The type of the class - may be used to save information in an
-     * hierarchical manner in the object store.
+     * hierarchical manner in the object participantStore.
      */
 
     public String type()
@@ -397,7 +382,7 @@
 	newStateIsValid = false;
 	oldState = null;
 	oType = RecordType.NONE_RECORD;
-	store = null;
+	targetParticipantStore = null;
 
 	if (tsLogger.logger.isDebugEnabled()) {
         tsLogger.logger.debug("CadaverRecord::CadaverRecord ()");
@@ -407,6 +392,4 @@
     private boolean           newStateIsValid;
     private OutputObjectState oldState;
     private int               oType;
-    private ObjectStore       store;
-
 }

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/abstractrecords/DisposeRecord.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/abstractrecords/DisposeRecord.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/abstractrecords/DisposeRecord.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -41,10 +41,9 @@
 import com.arjuna.ats.arjuna.logging.tsLogger;
 
 import com.arjuna.ats.arjuna.coordinator.*;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
 import com.arjuna.ats.arjuna.common.*;
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
 import com.arjuna.ats.arjuna.state.*;
-import com.arjuna.ats.arjuna.objectstore.ObjectStoreType;
 import com.arjuna.ats.internal.arjuna.common.UidHelper;
 
 import java.io.PrintWriter;
@@ -54,11 +53,11 @@
 public class DisposeRecord extends CadaverRecord
 {
 
-    public DisposeRecord (ObjectStore objStore, StateManager sm)
+    public DisposeRecord (ParticipantStore participantStore, StateManager sm)
     {
-	super(null, objStore, sm);
+	super(null, participantStore, sm);
 	
-	store = objStore;
+	this.targetParticipantStore = participantStore;
 	
 	if (sm != null)
 	{
@@ -72,7 +71,7 @@
 	}
 
 	if (tsLogger.logger.isDebugEnabled()) {
-        tsLogger.logger.debug("DisposeRecord::DisposeRecord(" + objStore + ", " + objectUid + ")");
+        tsLogger.logger.debug("DisposeRecord::DisposeRecord(" + participantStore + ", " + objectUid + ")");
     }
     }
 
@@ -110,7 +109,7 @@
         tsLogger.logger.debug("DisposeRecord::nestedPrepare() for " + order());
     }
 	
-	if ((store != null) && (objectUid.notEquals(Uid.nullUid())))
+	if ((targetParticipantStore != null) && (objectUid.notEquals(Uid.nullUid())))
 	    return TwoPhaseOutcome.PREPARE_OK;
 	else
 	    return TwoPhaseOutcome.PREPARE_NOTOK;
@@ -126,7 +125,7 @@
     }
     
     /**
-     * At topLevelCommit we remove the state from the object store.
+     * At topLevelCommit we remove the state from the object participantStore.
      */
     
     public int topLevelCommit ()
@@ -135,11 +134,11 @@
         tsLogger.logger.debug("DisposeRecord::topLevelCommit() for " + order());
     }
 
-	if ((store != null) && (objectUid.notEquals(Uid.nullUid())))
+	if ((targetParticipantStore != null) && (objectUid.notEquals(Uid.nullUid())))
 	{
 	    try
 	    {
-		if (store.remove_committed(objectUid, typeName))
+		if (targetParticipantStore.remove_committed(objectUid, typeName))
 		{
 		    // only valid if not doing recovery
 
@@ -159,20 +158,22 @@
 	
 	return TwoPhaseOutcome.FINISH_ERROR;
     }
-    
+
     public int topLevelPrepare ()
     {
-	if (tsLogger.logger.isDebugEnabled()) {
-        tsLogger.logger.debug("DisposeRecord::topLevelPrepare() for " + order());
+        if (tsLogger.logger.isDebugEnabled()) {
+            tsLogger.logger.debug("DisposeRecord::topLevelPrepare() for " + order());
+        }
+
+        if ((targetParticipantStore != null) && (objectUid.notEquals(Uid.nullUid())))
+        {
+            // force PersistenceRecord.save_state to ignore topLevelState:
+            shadowForced();
+            return TwoPhaseOutcome.PREPARE_OK;
+        }
+        else
+            return TwoPhaseOutcome.PREPARE_NOTOK;
     }
-	
-	if ((store != null) && (objectUid.notEquals(Uid.nullUid())))
-	{
-	    return TwoPhaseOutcome.PREPARE_OK;
-	}
-	else
-	    return TwoPhaseOutcome.PREPARE_NOTOK;
-    }
     
     public void print (PrintWriter strm)
     {
@@ -187,71 +188,49 @@
 
     public boolean save_state (OutputObjectState os, int ot)
     {
-	boolean res = true;
-	
-	if ((store != null) && (objectUid.notEquals(Uid.nullUid())))
-	{
-	    if (!ObjectStoreType.valid(store.typeIs())) {
-            tsLogger.i18NLogger.warn_DisposeRecord_1();
+        boolean res = true;
 
-            res = false;
+        if ((targetParticipantStore != null) && (objectUid.notEquals(Uid.nullUid())))
+        {
+            try
+            {
+                UidHelper.packInto(objectUid, os);
+                os.packString(typeName);
+
+                res = (res && super.save_state(os, ot));
+            }
+            catch (IOException e) {
+                tsLogger.i18NLogger.warn_DisposeRecord_2();
+                res = false;
+            }
         }
-	    else
-	    {
-		try
-		{
-		    os.packInt(store.typeIs());
-		    store.pack(os);
-				
-		    UidHelper.packInto(objectUid, os);
-		    os.packString(typeName);
-		}
-		catch (IOException e) {
-            tsLogger.i18NLogger.warn_DisposeRecord_2();
+        else {
+            tsLogger.i18NLogger.warn_DisposeRecord_3();
+
             res = false;
         }
-	    }
-	}
-	else {
-        tsLogger.i18NLogger.warn_DisposeRecord_3();
 
-        res = false;
+        return res;
     }
-	
-	return res;
-    }
-    
+
     public boolean restore_state (InputObjectState os, int ot)
     {
-	boolean res = true;
-	int objStoreType = 0;
-	
-	try
-	{
-	    objStoreType = os.unpackInt();
-		
-	    if (ObjectStoreType.valid(objStoreType))
-	    {
-		Class<? extends ObjectStore> osc = ObjectStoreType.typeToClass(objStoreType);
-			
-		store = osc.newInstance();
-		store.unpack(os);
-			
-		objectUid = UidHelper.unpackFrom(os);
-		typeName = os.unpackString();
-	    }
-	    else {
-            tsLogger.i18NLogger.warn_DisposeRecord_4(Integer.toString(objStoreType));
+        boolean res = true;
 
+        try
+        {
+            objectUid = UidHelper.unpackFrom(os);
+            typeName = os.unpackString();
+
+            res = (res && super.restore_state(os, ot));
+
+        }
+        catch (final Exception e)
+        {
             res = false;
         }
-	}
-	catch (final Exception e)
-	{
-	    res = false;
-	}
-	
-	return res;
+
+        return res;
     }
     
     public String type ()
@@ -285,11 +264,10 @@
 
 	objectUid = new Uid(Uid.nullUid());
 	typeName = null;
-	store = null;
+	targetParticipantStore = null;
     }
     
     private Uid         objectUid;
     private String      typeName;
-    private ObjectStore store;
 }
 

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/abstractrecords/PersistenceRecord.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/abstractrecords/PersistenceRecord.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/abstractrecords/PersistenceRecord.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -37,10 +37,10 @@
 
 import com.arjuna.ats.arjuna.coordinator.*;
 import com.arjuna.ats.arjuna.common.arjPropertyManager;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
 import com.arjuna.ats.arjuna.common.*;
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.state.*;
-import com.arjuna.ats.arjuna.objectstore.ObjectStoreType;
 import java.io.PrintWriter;
 
 import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
@@ -64,7 +64,7 @@
 	 * This constructor is used to create a new instance of PersistenceRecord.
 	 */
 
-	public PersistenceRecord (OutputObjectState os, ObjectStore objStore, StateManager sm)
+	public PersistenceRecord (OutputObjectState os, ParticipantStore participantStore, StateManager sm)
 	{
 		super(os, sm);
 
@@ -74,7 +74,7 @@
         }
 
 		shadowMade = false;
-		store = objStore;
+		this.targetParticipantStore = participantStore;
 		topLevelState = null;
 	}
 
@@ -123,7 +123,7 @@
 
 		try
 		{
-			if (!store.remove_uncommitted(uid, type)) {
+			if (!targetParticipantStore.remove_uncommitted(uid, type)) {
                 tsLogger.i18NLogger.warn_PersistenceRecord_19();
 
                 return TwoPhaseOutcome.FINISH_ERROR;
@@ -151,9 +151,9 @@
 
 		if (tsLogger.logger.isDebugEnabled())
 		{
-			if (store != null) {
+			if (targetParticipantStore != null) {
                 tsLogger.logger.debug(", store = "
-                        + store + "(" + store.typeIs() + ")");
+                        + targetParticipantStore + "(" + targetParticipantStore.typeIs() + ")");
             }
 			else {
                 tsLogger.logger.debug("");
@@ -162,13 +162,13 @@
 
 		boolean result = false;
 
-		if (store != null)
+		if (targetParticipantStore != null)
 		{
 			try
 			{
 				if (shadowMade)
 				{
-					result = store.commit_state(order(), super.getTypeOfObject());
+					result = targetParticipantStore.commit_state(order(), super.getTypeOfObject());
 
 					if (!result) {
                         tsLogger.i18NLogger.warn_PersistenceRecord_2(order());
@@ -178,7 +178,7 @@
 				{
 					if (topLevelState != null)
 					{
-						result = store.write_committed(order(), super.getTypeOfObject(), topLevelState);
+						result = targetParticipantStore.write_committed(order(), super.getTypeOfObject(), topLevelState);
 					}
 					else {
                         tsLogger.i18NLogger.warn_PersistenceRecord_3();
@@ -227,7 +227,7 @@
 		int result = TwoPhaseOutcome.PREPARE_NOTOK;
 		StateManager sm = super.objectAddr;
 
-		if ((sm != null) && (store != null))
+		if ((sm != null) && (targetParticipantStore != null))
 		{
 		    /*
 		     * Get ready to create our state to be saved. At this stage we're not
@@ -238,7 +238,7 @@
 			topLevelState = new OutputObjectState(sm.get_uid(), sm.type());
 
 			if (writeOptimisation
-					&& (!store.fullCommitNeeded()
+					&& (!targetParticipantStore.fullCommitNeeded()
 							&& (sm.save_state(topLevelState, ObjectType.ANDPERSISTENT)) && (topLevelState.size() <= PersistenceRecord.MAX_OBJECT_SIZE)))
 			{
 			    /*
@@ -259,7 +259,7 @@
 
 					try
 					{
-						store.write_uncommitted(sm.get_uid(), sm.type(), dummy);
+						targetParticipantStore.write_uncommitted(sm.get_uid(), sm.type(), dummy);
 						result = TwoPhaseOutcome.PREPARE_OK;
 					}
 					catch (ObjectStoreException e) {
@@ -279,7 +279,7 @@
 			}
 			else
 			{
-				if (sm.deactivate(store.getStoreName(), false))
+				if (sm.deactivate(targetParticipantStore.getStoreName(), false))
 				{
 					shadowMade = true;
 
@@ -330,46 +330,32 @@
         }
 
 		boolean res = false;
-		int objStoreType = 0;
-
 		topLevelState = null;
-		
-		try
-		{
-			objStoreType = os.unpackInt();
 
-			if (tsLogger.logger.isDebugEnabled()) {
-                tsLogger.logger.debug(" PersistenceRecord::restore_state: Just unpacked object store type = "+Integer.toString(objStoreType));
-            }
+        try
+        {
+            shadowMade = os.unpackBoolean();
 
-			if (ObjectStoreType.valid(objStoreType))
-			{
-				/* discard old store before creating new */
+            // topLevelState = null;
 
-				if (store == null)
-				{
-				    Class<? extends ObjectStore> oc = ObjectStoreType.typeToClass(objStoreType);
-				    
-				    store = oc.newInstance();
-				}
+            if (!shadowMade)
+            {
+                topLevelState = new OutputObjectState(os);
+                res = topLevelState.valid();
+            }
+            else
+                res = true;
 
-				store.unpack(os);
-				shadowMade = os.unpackBoolean();
+            res = (res && super.restore_state(os, ot));
 
-				// topLevelState = null;
+            // Note: we don't persist the targetParticipantStore, instead assuming the
+            // default one present at recovery time will be equivalent. Changing the
+            // objectstore config when records exist in the tx store is therefore a Bad Thing.
+            targetParticipantStore = getStore();
 
-				if (!shadowMade)
-				{
-					topLevelState = new OutputObjectState(os);
-					res = topLevelState.valid();
-				}
-				else
-					res = true;
-
-				return (res && super.restore_state(os, ot));
-			}
-		}
-		catch (final Exception e) {
+            return res;
+        }
+        catch (final Exception e) {
             tsLogger.i18NLogger.warn_PersistenceRecord_10();
         }
 
@@ -385,54 +371,39 @@
 
 		boolean res = true;
 
-		if (store != null)
+		if (targetParticipantStore != null)
 		{
-			if (!ObjectStoreType.valid(store.typeIs())) {
-                tsLogger.i18NLogger.warn_PersistenceRecord_11();
+            // Note: we don't persist the targetParticipantStore, instead assuming the
+            // default one present at recovery time will be equivalent. Changing the
+            // objectstore config when records exist in the tx store is therefore a Bad Thing.
 
-                res = false;
-            }
-			else
-			{
-				try
-				{
-					os.packInt(store.typeIs());
+            try
+            {
+                os.packBoolean(shadowMade);
 
-					if (tsLogger.logger.isDebugEnabled()) {
-                        tsLogger.logger.debug("PersistenceRecord::save_state: Packed object store type = "+Integer.toString(store.typeIs()));
-                    }
+                /*
+                         * If we haven't written a shadow state, then pack the state
+                         * into the transaction log. There MUST be a state at this
+                         * point.
+                         */
 
-					store.pack(os);
+                if (!shadowMade)
+                {
+                    res = (topLevelState != null);
 
-					if (tsLogger.logger.isDebugEnabled()) {
-                        tsLogger.logger.debug("PersistenceRecord::save_state: Packed object store root");
+                    if (res)
+                        topLevelState.packInto(os);
+                    else {
+                        tsLogger.i18NLogger.warn_PersistenceRecord_14();
                     }
+                }
+            }
+            catch (IOException e) {
+                res = false;
 
-					os.packBoolean(shadowMade);
+                tsLogger.i18NLogger.warn_PersistenceRecord_15();
+            }
 
-					/*
-					 * If we haven't written a shadow state, then pack the state
-					 * into the transaction log. There MUST be a state at this
-					 * point.
-					 */
-
-					if (!shadowMade)
-					{
-						res = (topLevelState != null);
-
-						if (res)
-							topLevelState.packInto(os);
-						else {
-                            tsLogger.i18NLogger.warn_PersistenceRecord_14();
-                        }
-					}
-				}
-				catch (IOException e) {
-                    res = false;
-
-                    tsLogger.i18NLogger.warn_PersistenceRecord_15();
-                }
-			}
 		}
 		else {
             tsLogger.i18NLogger.warn_PersistenceRecord_16();
@@ -474,7 +445,7 @@
         }
 
 		shadowMade = false;
-		store = null;
+		targetParticipantStore = null;
 		topLevelState = null;
 	}
 
@@ -502,7 +473,7 @@
 	public static final int MAX_OBJECT_SIZE = 4096; // block size
 
 	protected boolean shadowMade;
-	protected ObjectStore store;
+	protected ParticipantStore targetParticipantStore;
 	protected OutputObjectState topLevelState;
 	protected static boolean classicPrepare = false;
 

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/AtomicActionRecoveryModule.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/AtomicActionRecoveryModule.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/AtomicActionRecoveryModule.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -38,8 +38,9 @@
 import com.arjuna.ats.arjuna.coordinator.ActionStatus ;
 import com.arjuna.ats.arjuna.coordinator.TxControl ;
 import com.arjuna.ats.arjuna.exceptions.ObjectStoreException ;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore ;
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
 import com.arjuna.ats.arjuna.objectstore.StateStatus;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.recovery.RecoverAtomicAction ;
 import com.arjuna.ats.arjuna.recovery.RecoveryModule ;
 import com.arjuna.ats.arjuna.recovery.TransactionStatusConnectionManager ;
@@ -62,9 +63,9 @@
            tsLogger.logger.debug("AtomicActionRecoveryModule created");
        }
 
-      if (_transactionStore == null)
+      if (_recoveryStore == null)
       {
-         _transactionStore = TxControl.getStore() ;
+         _recoveryStore = StoreManager.getRecoveryStore();
       }
 
       _transactionStatusConnectionMgr = new TransactionStatusConnectionManager() ;
@@ -87,7 +88,7 @@
           tsLogger.logger.debug("AtomicActionRecoveryModule first pass");
       }
 
-	  AtomicActions = _transactionStore.allObjUids( _transactionType, aa_uids );
+	  AtomicActions = _recoveryStore.allObjUids( _transactionType, aa_uids );
 
       }
       catch ( ObjectStoreException ex ) {
@@ -115,9 +116,9 @@
            tsLogger.logger.debug("AtomicActionRecoveryModule created");
        }
 
-      if (_transactionStore == null)
+      if (_recoveryStore == null)
       {
-         _transactionStore = TxControl.getStore() ;
+         _recoveryStore = StoreManager.getRecoveryStore();
       }
 
       _transactionStatusConnectionMgr = new TransactionStatusConnectionManager() ;
@@ -246,7 +247,7 @@
 
          try
          {
-            if ( _transactionStore.currentState( currentUid, _transactionType ) != StateStatus.OS_UNKNOWN )
+            if ( _recoveryStore.currentState( currentUid, _transactionType ) != StateStatus.OS_UNKNOWN )
             {
                doRecoverTransaction( currentUid ) ;
             }
@@ -266,7 +267,7 @@
    private Vector _transactionUidVector = null ;
 
    // Reference to the Object Store.
-   private static ObjectStore _transactionStore = null ;
+   private static RecoveryStore _recoveryStore = null ;
 
    // This object manages the interface to all TransactionStatusManagers
    // processes(JVMs) on this system/node.

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/ExpiredTransactionScanner.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/ExpiredTransactionScanner.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/ExpiredTransactionScanner.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -24,7 +24,8 @@
 import java.util.*;
 
 import com.arjuna.ats.arjuna.common.Uid;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.recovery.ExpiryScanner;
 import com.arjuna.ats.arjuna.state.InputObjectState;
 import com.arjuna.ats.arjuna.state.OutputObjectState;
@@ -44,7 +45,7 @@
 {
 	public ExpiredTransactionScanner(String typeName, String movedTypeName)
 	{
-		_objectStore = TxControl.getStore();
+		_recoveryStore = StoreManager.getRecoveryStore();
 		_typeName = typeName;
 		_movedTypeName = movedTypeName;
 	}
@@ -68,7 +69,7 @@
 
 			// take a snapshot of the log
 
-			if (_objectStore.allObjUids(_typeName, uids))
+			if (_recoveryStore.allObjUids(_typeName, uids))
 			{
 				Uid theUid = null;
 
@@ -136,19 +137,19 @@
 
 	public boolean moveEntry (Uid newUid) throws ObjectStoreException
 	{
-	    InputObjectState state = _objectStore.read_committed(newUid, _typeName);
+	    InputObjectState state = _recoveryStore.read_committed(newUid, _typeName);
 	    boolean res = false;
 	    
 	    if (state != null) // just in case recovery
 	        // kicked-in
 	    {
-	        boolean moved = _objectStore.write_committed(newUid, _movedTypeName, new OutputObjectState(state));
+	        boolean moved = _recoveryStore.write_committed(newUid, _movedTypeName, new OutputObjectState(state));
 
 	        if (!moved) {
                 tsLogger.i18NLogger.info_recovery_ExpiredTransactionStatusManagerScanner_3(newUid);
             }
 	        else
-	            res = _objectStore.remove_committed(newUid, _typeName);
+	            res = _recoveryStore.remove_committed(newUid, _typeName);
 	    }
           
 	    return res;
@@ -158,7 +159,7 @@
 
 	private String _movedTypeName;
 
-	private ObjectStore _objectStore;
+	private RecoveryStore _recoveryStore;
 
 	private Hashtable _scanM = null;
 

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/ExpiredTransactionStatusManagerScanner.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/ExpiredTransactionStatusManagerScanner.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/ExpiredTransactionStatusManagerScanner.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -36,7 +36,8 @@
 
 import com.arjuna.ats.arjuna.common.Uid ;
 import com.arjuna.ats.arjuna.common.recoveryPropertyManager;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore ;
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.recovery.ExpiryScanner ;
 import com.arjuna.ats.arjuna.state.InputObjectState ;
 
@@ -57,7 +58,7 @@
            tsLogger.logger.debug("ExpiredTransactionStatusManagerScanner created, with expiry time of "+Integer.toString(_expiryTime)+"  seconds");
        }
 
-      _objectStore  = TransactionStatusManagerItem.getStore() ;
+      _recoveryStore = StoreManager.getRecoveryStore();
       _itemTypeName = TransactionStatusManagerItem.typeName() ;
    }
 
@@ -78,7 +79,7 @@
          InputObjectState uids = new InputObjectState() ;
 
          // find the uids of all the transaction status manager items
-         if ( _objectStore.allObjUids(_itemTypeName, uids) )
+         if ( _recoveryStore.allObjUids(_itemTypeName, uids) )
          {
             Uid theUid = null;
 
@@ -107,7 +108,7 @@
                      {
 			 tsLogger.i18NLogger.info_recovery_ExpiredTransactionStatusManagerScanner_3(newUid);
 			 
-			 _objectStore.remove_committed( newUid, _itemTypeName ) ;
+			 _recoveryStore.remove_committed( newUid, _itemTypeName ) ;
                      }
                      else
                      {
@@ -148,7 +149,7 @@
     }
     
     private String      _itemTypeName ;
-    private ObjectStore _objectStore ;
+    private RecoveryStore _recoveryStore;
     
     private static int _expiryTime = 12 * 60 * 60 ; // default is 12 hours
     

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/TransactionStatusManagerItem.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/TransactionStatusManagerItem.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/TransactionStatusManagerItem.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -36,9 +36,9 @@
 import java.util.* ;
 
 import com.arjuna.ats.arjuna.common.Uid ;
-import com.arjuna.ats.arjuna.coordinator.TxControl ;
 import com.arjuna.ats.arjuna.exceptions.ObjectStoreException ;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore ;
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.state.InputObjectState ;
 import com.arjuna.ats.arjuna.state.OutputObjectState ;
 import com.arjuna.ats.arjuna.utils.Utility ;
@@ -81,13 +81,9 @@
     /**
      * Get a reference to the Object Store.
      */
-    public static ObjectStore getStore()
+    private static RecoveryStore getStore()
     {
-	if ( _objectStore == null )
-	    {
-		_objectStore = TxControl.getRecoveryStore();
-	    }
-	return _objectStore;
+        return StoreManager.getRecoveryStore();
     }
     
     /**
@@ -352,9 +348,6 @@
     // Host/port pair on which to connect to the Transaction status manager.
     private String _host ;
     private int    _port ;
-
-    // Reference to the object store.
-    private static ObjectStore _objectStore = null;
     
     // The singleton instance of this class.
     private static TransactionStatusManagerItem _singularItem = null ;

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/abstractrecords/CadaverActivationUnitTest.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/abstractrecords/CadaverActivationUnitTest.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/abstractrecords/CadaverActivationUnitTest.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -23,6 +23,11 @@
 import java.io.ByteArrayOutputStream;
 import java.io.PrintWriter;
 
+import com.arjuna.ats.arjuna.StateManager;
+import com.arjuna.ats.arjuna.common.Uid;
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
+import com.arjuna.ats.arjuna.objectstore.StateType;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import org.junit.Test;
 
 import com.arjuna.ats.arjuna.coordinator.RecordType;
@@ -40,6 +45,8 @@
     @Test
     public void test ()
     {
+        ParticipantStore store = StoreManager.setupStore(null, StateType.OS_UNSHARED);
+
         CadaverActivationRecord cr = new CadaverActivationRecord(new ExtendedObject());
         
         assertTrue(cr.propagateOnAbort());
@@ -49,7 +56,7 @@
         assertTrue(cr.type() != null);
         assertEquals(cr.doSave(), false);
 
-        assertFalse(cr.shouldReplace(new PersistenceRecord(new OutputObjectState(), TxControl.getStore(), new ExtendedObject())));
+        assertFalse(cr.shouldReplace(new PersistenceRecord(new OutputObjectState(), store, new ExtendedObject())));
         
         assertEquals(cr.nestedPrepare(), TwoPhaseOutcome.PREPARE_READONLY);
         assertEquals(cr.nestedAbort(), TwoPhaseOutcome.FINISH_OK);

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/abstractrecords/CadaverRecordUnitTest.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/abstractrecords/CadaverRecordUnitTest.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/abstractrecords/CadaverRecordUnitTest.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -23,12 +23,14 @@
 import java.io.ByteArrayOutputStream;
 import java.io.PrintWriter;
 
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
+import com.arjuna.ats.arjuna.objectstore.StateType;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import org.junit.Test;
 
 import com.arjuna.ats.arjuna.common.Uid;
 import com.arjuna.ats.arjuna.coordinator.RecordType;
 import com.arjuna.ats.arjuna.coordinator.TwoPhaseOutcome;
-import com.arjuna.ats.arjuna.coordinator.TxControl;
 import com.arjuna.ats.arjuna.state.OutputObjectState;
 import com.arjuna.ats.internal.arjuna.abstractrecords.CadaverRecord;
 import com.arjuna.ats.internal.arjuna.abstractrecords.DisposeRecord;
@@ -42,8 +44,10 @@
     @Test
     public void test ()
     {
-        CadaverRecord cr = new CadaverRecord(new OutputObjectState(), TxControl.getStore(), new ExtendedObject());
+        ParticipantStore store = StoreManager.setupStore(null, StateType.OS_UNSHARED);
         
+        CadaverRecord cr = new CadaverRecord(new OutputObjectState(), store, new ExtendedObject());
+        
         assertTrue(cr.propagateOnAbort());
         assertTrue(cr.propagateOnCommit());
         assertEquals(cr.typeIs(), RecordType.PERSISTENCE);
@@ -51,26 +55,26 @@
         assertTrue(cr.type() != null);
         assertEquals(cr.doSave(), false);
 
-        cr.merge(new PersistenceRecord(new OutputObjectState(), TxControl.getStore(), new ExtendedObject()));
+        cr.merge(new PersistenceRecord(new OutputObjectState(), store, new ExtendedObject()));
         
         assertEquals(cr.nestedPrepare(), TwoPhaseOutcome.PREPARE_READONLY);
         assertEquals(cr.nestedAbort(), TwoPhaseOutcome.FINISH_OK);
 
-        cr = new CadaverRecord(new OutputObjectState(), TxControl.getStore(), new ExtendedObject());
-        cr.merge(new PersistenceRecord(new OutputObjectState(), TxControl.getStore(), new ExtendedObject()));
+        cr = new CadaverRecord(new OutputObjectState(), store, new ExtendedObject());
+        cr.merge(new PersistenceRecord(new OutputObjectState(), store, new ExtendedObject()));
         
         assertEquals(cr.nestedPrepare(), TwoPhaseOutcome.PREPARE_READONLY);
         assertEquals(cr.nestedCommit(), TwoPhaseOutcome.FINISH_OK);
         
-        cr = new CadaverRecord(new OutputObjectState(new Uid(), "foobar"), TxControl.getStore(), new ExtendedObject());
-        cr.merge(new PersistenceRecord(new OutputObjectState(new Uid(), "foobar"), TxControl.getStore(), new ExtendedObject()));
+        cr = new CadaverRecord(new OutputObjectState(new Uid(), "foobar"), store, new ExtendedObject());
+        cr.merge(new PersistenceRecord(new OutputObjectState(new Uid(), "foobar"), store, new ExtendedObject()));
         
         assertEquals(cr.topLevelPrepare(), TwoPhaseOutcome.PREPARE_OK);
         assertEquals(cr.topLevelAbort(), TwoPhaseOutcome.FINISH_OK);
  
-        cr = new CadaverRecord(new OutputObjectState(new Uid(), "foobar"), TxControl.getStore(), new ExtendedObject());
-        cr.merge(new PersistenceRecord(new OutputObjectState(new Uid(), "foobar"), TxControl.getStore(), new ExtendedObject()));
-        cr.merge(new PersistenceRecord(new OutputObjectState(new Uid(), "foobar"), TxControl.getStore(), new ExtendedObject()));
+        cr = new CadaverRecord(new OutputObjectState(new Uid(), "foobar"), store, new ExtendedObject());
+        cr.merge(new PersistenceRecord(new OutputObjectState(new Uid(), "foobar"), store, new ExtendedObject()));
+        cr.merge(new PersistenceRecord(new OutputObjectState(new Uid(), "foobar"), store, new ExtendedObject()));
         
         assertEquals(cr.topLevelPrepare(), TwoPhaseOutcome.PREPARE_OK);
         assertEquals(cr.topLevelCommit(), TwoPhaseOutcome.FINISH_OK);

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/abstractrecords/DisposeRecordUnitTest.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/abstractrecords/DisposeRecordUnitTest.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/abstractrecords/DisposeRecordUnitTest.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -20,16 +20,14 @@
  */
 package com.hp.mwtests.ts.arjuna.abstractrecords;
 
-import java.io.ByteArrayOutputStream;
-import java.io.PrintWriter;
-
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
+import com.arjuna.ats.arjuna.objectstore.StateType;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import org.junit.Test;
 
-import com.arjuna.ats.arjuna.AtomicAction;
 import com.arjuna.ats.arjuna.ObjectType;
 import com.arjuna.ats.arjuna.coordinator.RecordType;
 import com.arjuna.ats.arjuna.coordinator.TwoPhaseOutcome;
-import com.arjuna.ats.arjuna.coordinator.TxControl;
 import com.arjuna.ats.arjuna.state.InputObjectState;
 import com.arjuna.ats.arjuna.state.OutputObjectState;
 import com.arjuna.ats.internal.arjuna.abstractrecords.DisposeRecord;
@@ -43,8 +41,10 @@
     @Test
     public void test ()
     {
-        DisposeRecord cr = new DisposeRecord(TxControl.getStore(), new ExtendedObject());
+        ParticipantStore store = StoreManager.setupStore(null, StateType.OS_UNSHARED);
         
+        DisposeRecord cr = new DisposeRecord(store, new ExtendedObject());
+        
         assertFalse(cr.propagateOnAbort());
         assertTrue(cr.propagateOnCommit());
         assertEquals(cr.typeIs(), RecordType.DISPOSE);
@@ -55,20 +55,20 @@
         assertEquals(cr.nestedPrepare(), TwoPhaseOutcome.PREPARE_OK);
         assertEquals(cr.nestedAbort(), TwoPhaseOutcome.FINISH_OK);
 
-        cr = new DisposeRecord(TxControl.getStore(), new ExtendedObject());
+        cr = new DisposeRecord(store, new ExtendedObject());
         
         assertEquals(cr.nestedPrepare(), TwoPhaseOutcome.PREPARE_OK);
         assertEquals(cr.nestedCommit(), TwoPhaseOutcome.FINISH_OK);
         
-        cr = new DisposeRecord(TxControl.getStore(), new ExtendedObject());
+        cr = new DisposeRecord(store, new ExtendedObject());
         
         assertEquals(cr.topLevelPrepare(), TwoPhaseOutcome.PREPARE_OK);
         assertEquals(cr.topLevelAbort(), TwoPhaseOutcome.FINISH_OK);
  
-        cr = new DisposeRecord(TxControl.getStore(), new ExtendedObject());
+        cr = new DisposeRecord(store, new ExtendedObject());
         
         assertEquals(cr.topLevelPrepare(), TwoPhaseOutcome.PREPARE_OK);
-        assertEquals(cr.topLevelCommit(), TwoPhaseOutcome.FINISH_ERROR);
+        assertEquals(cr.topLevelCommit(), TwoPhaseOutcome.FINISH_OK);
         
         cr = new DisposeRecord();
         

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/abstractrecords/PersistenceRecordUnitTest.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/abstractrecords/PersistenceRecordUnitTest.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/abstractrecords/PersistenceRecordUnitTest.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -23,14 +23,15 @@
 import java.io.ByteArrayOutputStream;
 import java.io.PrintWriter;
 
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
+import com.arjuna.ats.arjuna.objectstore.StateType;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import org.junit.Test;
 
 import com.arjuna.ats.arjuna.ObjectType;
-import com.arjuna.ats.arjuna.common.Uid;
 import com.arjuna.ats.arjuna.common.arjPropertyManager;
 import com.arjuna.ats.arjuna.coordinator.RecordType;
 import com.arjuna.ats.arjuna.coordinator.TwoPhaseOutcome;
-import com.arjuna.ats.arjuna.coordinator.TxControl;
 import com.arjuna.ats.arjuna.state.InputObjectState;
 import com.arjuna.ats.arjuna.state.OutputObjectState;
 import com.arjuna.ats.internal.arjuna.abstractrecords.PersistenceRecord;
@@ -43,8 +44,10 @@
     @Test
     public void test ()
     {
-        PersistenceRecord cr = new PersistenceRecord(new OutputObjectState(), TxControl.getStore(), new ExtendedObject());
+        ParticipantStore store = StoreManager.setupStore(null, StateType.OS_UNSHARED);
         
+        PersistenceRecord cr = new PersistenceRecord(new OutputObjectState(), store, new ExtendedObject());
+        
         arjPropertyManager.getCoordinatorEnvironmentBean().setClassicPrepare(true);
         
         assertFalse(cr.propagateOnAbort());
@@ -57,7 +60,7 @@
         assertEquals(cr.topLevelPrepare(), TwoPhaseOutcome.PREPARE_OK);
         assertEquals(cr.topLevelAbort(), TwoPhaseOutcome.FINISH_ERROR);
  
-        cr = new PersistenceRecord(new OutputObjectState(), TxControl.getStore(), new ExtendedObject());
+        cr = new PersistenceRecord(new OutputObjectState(), store, new ExtendedObject());
         
         assertEquals(cr.topLevelPrepare(), TwoPhaseOutcome.PREPARE_OK);
         assertEquals(cr.topLevelCommit(), TwoPhaseOutcome.FINISH_OK);

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/atomicaction/TxControlUnitTest.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/atomicaction/TxControlUnitTest.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/atomicaction/TxControlUnitTest.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -56,10 +56,6 @@
     @Test
     public void testGetSet () throws Exception
     {
-        assertEquals(TxControl.getActionStoreType(), arjPropertyManager.getCoordinatorEnvironmentBean().getActionStore());
-        
-        assertTrue(TxControl.getRecoveryStore() != null);
-        
         TxControl.setDefaultTimeout(1000);
         
         assertEquals(TxControl.getDefaultTimeout(), 1000);

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/AllObjUidsTest.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/AllObjUidsTest.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/AllObjUidsTest.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -31,8 +31,9 @@
 
 package com.hp.mwtests.ts.arjuna.objectstore;
 
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
 import com.arjuna.ats.arjuna.objectstore.StateStatus;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.state.*;
 import com.arjuna.ats.arjuna.common.Uid;
 import com.arjuna.ats.arjuna.coordinator.TxControl;
@@ -49,21 +50,21 @@
     @Test
     public void test() throws IOException, ObjectStoreException
     {
-        ObjectStore objStore = TxControl.getStore();
+        RecoveryStore recoveryStore = StoreManager.getRecoveryStore();
         String type = "/StateManager/BasicAction/TwoPhaseCoordinator/AtomicAction/DummyAtomicAction";
 
         InputObjectState ios = new InputObjectState();
-        objStore.allObjUids(type, ios, StateStatus.OS_UNKNOWN);
+        recoveryStore.allObjUids(type, ios, StateStatus.OS_UNKNOWN);
         Uid uid = UidHelper.unpackFrom(ios);
         assertEquals(Uid.nullUid(), uid);
 
         ios = new InputObjectState();
-        objStore.allObjUids(type, ios, StateStatus.OS_COMMITTED);
+        recoveryStore.allObjUids(type, ios, StateStatus.OS_COMMITTED);
         uid = UidHelper.unpackFrom(ios);
         assertEquals(Uid.nullUid(), uid);
 
         ios = new InputObjectState();
-        objStore.allObjUids(type, ios, StateStatus.OS_UNCOMMITTED);
+        recoveryStore.allObjUids(type, ios, StateStatus.OS_UNCOMMITTED);
         uid = UidHelper.unpackFrom(ios);
         assertEquals(Uid.nullUid(), uid);
     }

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/CachedTest.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/CachedTest.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/CachedTest.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -31,7 +31,7 @@
 
 package com.hp.mwtests.ts.arjuna.objectstore;
 
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
 import com.arjuna.ats.arjuna.state.*;
 import com.arjuna.ats.arjuna.common.*;
 import com.arjuna.ats.internal.arjuna.objectstore.CacheStore;
@@ -45,9 +45,9 @@
 {
     private static final String TYPE = "test";
 
-    public ThreadWriter(ObjectStore theStore)
+    public ThreadWriter(ParticipantStore theStore)
     {
-        store = theStore;
+        participantStore = theStore;
     }
 
     public void run()
@@ -59,15 +59,15 @@
         try {
             state.packBytes(data);
 
-            if (store.write_committed(u, TYPE, state)) {
+            if (participantStore.write_committed(u, TYPE, state)) {
                 Thread.yield();
 
-                InputObjectState s = store.read_committed(u, TYPE);
+                InputObjectState s = participantStore.read_committed(u, TYPE);
 
                 Thread.yield();
                 
                 if (s != null) {
-                    if (store.remove_committed(u, TYPE))
+                    if (participantStore.remove_committed(u, TYPE))
                         passed = true;
                 }
                 else
@@ -83,7 +83,7 @@
 
     public boolean passed = false;
 
-    private ObjectStore store = null;
+    private ParticipantStore participantStore = null;
 }
 
 
@@ -97,7 +97,8 @@
         Thread[] t = new Thread[threads];
 
         arjPropertyManager.getObjectStoreEnvironmentBean().setCacheStoreSize(cacheSize);
-        ObjectStore store = new CacheStore();
+
+        ParticipantStore store = new CacheStore();
         
         long stime = Calendar.getInstance().getTime().getTime();
 

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/LogStoreRecoveryTest.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/LogStoreRecoveryTest.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/LogStoreRecoveryTest.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -31,12 +31,12 @@
 
 package com.hp.mwtests.ts.arjuna.objectstore;
 
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
 import com.arjuna.ats.arjuna.objectstore.StateStatus;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.state.*;
 import com.arjuna.ats.arjuna.common.Uid;
 import com.arjuna.ats.arjuna.common.arjPropertyManager;
-import com.arjuna.ats.arjuna.coordinator.TxControl;
 import com.arjuna.ats.internal.arjuna.common.UidHelper;
 import com.arjuna.ats.internal.arjuna.objectstore.LogStore;
 
@@ -60,7 +60,8 @@
     @Test
     public void test()
     {
-        ObjectStore objStore = TxControl.getStore();
+        RecoveryStore recoveryStore = StoreManager.getRecoveryStore();
+
         final int numberOfTransactions = 1000;
         final Uid[] ids = new Uid[numberOfTransactions];
         final int fakeData = 0xdeedbaaf;
@@ -72,7 +73,7 @@
             try {
                 dummyState.packInt(fakeData);
                 ids[i] = new Uid();
-                objStore.write_committed(ids[i], type, dummyState);
+                recoveryStore.write_committed(ids[i], type, dummyState);
             }
             catch (final Exception ex) {
                 ex.printStackTrace();
@@ -90,7 +91,7 @@
 
         for (int i = 0; i < numberOfTransactions / 2; i++) {
             try {
-                objStore.remove_committed(ids[i], type);
+                recoveryStore.remove_committed(ids[i], type);
             }
             catch (final Exception ex) {
                 ex.printStackTrace();
@@ -119,7 +120,7 @@
         boolean passed = true;
 
         try {
-            if (objStore.allObjUids(type, ios, StateStatus.OS_UNKNOWN)) {
+            if (recoveryStore.allObjUids(type, ios, StateStatus.OS_UNKNOWN)) {
                 Uid id = new Uid(Uid.nullUid());
                 int numberOfEntries = 0;
 

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/LogStoreTest.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/LogStoreTest.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/LogStoreTest.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -31,12 +31,12 @@
 
 package com.hp.mwtests.ts.arjuna.objectstore;
 
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
 import com.arjuna.ats.arjuna.objectstore.StateStatus;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.state.*;
 import com.arjuna.ats.arjuna.common.Uid;
 import com.arjuna.ats.arjuna.common.arjPropertyManager;
-import com.arjuna.ats.arjuna.coordinator.TxControl;
 import com.arjuna.ats.internal.arjuna.common.UidHelper;
 import com.arjuna.ats.internal.arjuna.objectstore.LogStore;
 
@@ -51,7 +51,7 @@
         arjPropertyManager.getObjectStoreEnvironmentBean().setObjectStoreType(LogStore.class.getName());
         arjPropertyManager.getCoordinatorEnvironmentBean().setTransactionLog(true);
 
-        ObjectStore objStore = TxControl.getStore();
+        RecoveryStore recoveryStore = StoreManager.getRecoveryStore();
         final int numberOfTransactions = 1000;
         final Uid[] ids = new Uid[numberOfTransactions];
         final int fakeData = 0xdeedbaaf;
@@ -63,7 +63,7 @@
             try {
                 dummyState.packInt(fakeData);
                 ids[i] = new Uid();
-                objStore.write_committed(ids[i], type, dummyState);
+                recoveryStore.write_committed(ids[i], type, dummyState);
             }
             catch (final Exception ex) {
                 ex.printStackTrace();
@@ -74,7 +74,7 @@
         boolean passed = false;
 
         try {
-            if (objStore.allObjUids(type, ios, StateStatus.OS_UNKNOWN)) {
+            if (recoveryStore.allObjUids(type, ios, StateStatus.OS_UNKNOWN)) {
                 Uid id = new Uid(Uid.nullUid());
                 int numberOfEntries = 0;
 

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/LogStoreTest2.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/LogStoreTest2.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/LogStoreTest2.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -31,12 +31,12 @@
 
 package com.hp.mwtests.ts.arjuna.objectstore;
 
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
 import com.arjuna.ats.arjuna.objectstore.StateStatus;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.state.*;
 import com.arjuna.ats.arjuna.common.Uid;
 import com.arjuna.ats.arjuna.common.arjPropertyManager;
-import com.arjuna.ats.arjuna.coordinator.TxControl;
 import com.arjuna.ats.internal.arjuna.common.UidHelper;
 import com.arjuna.ats.internal.arjuna.objectstore.LogStore;
 
@@ -54,7 +54,7 @@
         // the byteman script will manage this
         //System.setProperty(Environment.TRANSACTION_LOG_PURGE_TIME, "10000");
 
-        ObjectStore objStore = TxControl.getStore();
+        RecoveryStore recoveryStore = StoreManager.getRecoveryStore();
         final int numberOfTransactions = 1000;
         final Uid[] ids = new Uid[numberOfTransactions];
         final int fakeData = 0xdeedbaaf;
@@ -66,7 +66,7 @@
             try {
                 dummyState.packInt(fakeData);
                 ids[i] = new Uid();
-                objStore.write_committed(ids[i], type, dummyState);
+                recoveryStore.write_committed(ids[i], type, dummyState);
             }
             catch (final Exception ex) {
                 ex.printStackTrace();
@@ -74,7 +74,7 @@
         }
 
         try {
-            objStore.remove_committed(ids[0], type);
+            recoveryStore.remove_committed(ids[0], type);
         }
         catch (final Exception ex) {
             ex.printStackTrace();
@@ -98,7 +98,7 @@
         boolean passed = false;
 
         try {
-            if (objStore.allObjUids(type, ios, StateStatus.OS_UNKNOWN)) {
+            if (recoveryStore.allObjUids(type, ios, StateStatus.OS_UNKNOWN)) {
                 Uid id = new Uid(Uid.nullUid());
                 int numberOfEntries = 0;
 
@@ -132,10 +132,10 @@
                 while (id.notEquals(Uid.nullUid()));
 
                 if ((numberOfEntries == ids.length - 1) && passed) {
-                    if (objStore.currentState(ids[0], type) != StateStatus.OS_UNKNOWN)
+                    if (recoveryStore.currentState(ids[0], type) != StateStatus.OS_UNKNOWN)
                         passed = false;
                     else {
-                        if (objStore.currentState(ids[1], type) != StateStatus.OS_COMMITTED)
+                        if (recoveryStore.currentState(ids[1], type) != StateStatus.OS_COMMITTED)
                             passed = false;
                     }
                 } else {

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/LogStressTest.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/LogStressTest.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/LogStressTest.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -31,12 +31,11 @@
 
 package com.hp.mwtests.ts.arjuna.objectstore;
 
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.hp.mwtests.ts.arjuna.resources.*;
 
 import com.arjuna.ats.arjuna.AtomicAction;
 import com.arjuna.ats.arjuna.common.*;
-import com.arjuna.ats.arjuna.coordinator.TxControl;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
 import com.arjuna.ats.arjuna.objectstore.StateStatus;
 import com.arjuna.ats.arjuna.state.InputObjectState;
 import com.arjuna.ats.internal.arjuna.common.UidHelper;
@@ -125,7 +124,7 @@
         boolean passed = false;
 
         try {
-            TxControl.getStore().allObjUids(new MyAtomicAction().type(), ios, StateStatus.OS_UNKNOWN);
+            StoreManager.getRecoveryStore().allObjUids(new MyAtomicAction().type(), ios, StateStatus.OS_UNKNOWN);
 
             Uid tempUid = UidHelper.unpackFrom(ios);
 

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/ObjectStoreTest.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/ObjectStoreTest.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/ObjectStoreTest.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -36,11 +36,7 @@
 import com.arjuna.ats.arjuna.coordinator.TxControl;
 import com.arjuna.ats.arjuna.exceptions.FatalError;
 import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
-import com.arjuna.ats.arjuna.objectstore.ObjectStoreIterator;
-import com.arjuna.ats.arjuna.objectstore.ObjectStoreType;
-import com.arjuna.ats.arjuna.objectstore.StateStatus;
-import com.arjuna.ats.arjuna.objectstore.StateType;
+import com.arjuna.ats.arjuna.objectstore.*;
 import com.arjuna.ats.arjuna.state.InputObjectState;
 import com.arjuna.ats.arjuna.state.OutputObjectState;
 import com.arjuna.ats.arjuna.utils.FileLock;
@@ -570,10 +566,10 @@
         Uid u1 = new Uid();
         Uid u2 = new Uid();
         
-        TxControl.getStore().write_committed(u1, "foo", new OutputObjectState());
-        TxControl.getStore().write_committed(u2, "foo", new OutputObjectState());
+        StoreManager.getTxLog().write_committed(u1, "foo", new OutputObjectState());
+        StoreManager.getTxLog().write_committed(u2, "foo", new OutputObjectState());
         
-        ObjectStoreIterator iter = new ObjectStoreIterator(TxControl.getStore(), "foo");
+        ObjectStoreIterator iter = new ObjectStoreIterator(StoreManager.getRecoveryStore(), "foo");
         Uid x = iter.iterate();
         
         assertTrue(x.notEquals(Uid.nullUid()));

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/PersistenceTest.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/PersistenceTest.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/PersistenceTest.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -31,8 +31,7 @@
 
 package com.hp.mwtests.ts.arjuna.objectstore;
 
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
-import com.arjuna.ats.arjuna.*;
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
 import com.arjuna.ats.arjuna.state.*;
 import com.arjuna.ats.arjuna.common.*;
 
@@ -58,7 +57,7 @@
 
         for (int i = 0; i < 1000; i++) {
             try {
-                ObjectStore store = null;
+                ParticipantStore store = null;
 
                 if (!threaded)
                     store = new ShadowingStore();

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/RemoveCachedTest.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/RemoveCachedTest.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/RemoveCachedTest.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -32,7 +32,7 @@
 package com.hp.mwtests.ts.arjuna.objectstore;
 
 import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
 import com.arjuna.ats.arjuna.objectstore.StateStatus;
 import com.arjuna.ats.arjuna.state.*;
 import com.arjuna.ats.arjuna.common.*;
@@ -50,7 +50,7 @@
     public void test() throws IOException, ObjectStoreException
     {
         boolean passed = true;
-        ObjectStore store = new CacheStore();
+        RecoveryStore store = new CacheStore();
         String type = "ArjunaMS/Destinations/a3d6227_dc656_3b77ce7e_2/Messages";
         InputObjectState buff = new InputObjectState();
 

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/WriteCachedTest.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/WriteCachedTest.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/WriteCachedTest.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -31,7 +31,7 @@
 
 package com.hp.mwtests.ts.arjuna.objectstore;
 
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
 import com.arjuna.ats.arjuna.state.*;
 import com.arjuna.ats.arjuna.common.*;
 import com.arjuna.ats.internal.arjuna.objectstore.CacheStore;
@@ -45,9 +45,9 @@
 {
     private static final String TYPE = "test";
 
-    public WriterThread(ObjectStore theStore)
+    public WriterThread(ParticipantStore theStore)
     {
-        store = theStore;
+        participantStore = theStore;
     }
 
     public void run()
@@ -59,8 +59,8 @@
         try {
             state.packBytes(data);
 
-            if (store.write_committed(u, TYPE, state)) {
-                InputObjectState s = store.read_committed(u, TYPE);
+            if (participantStore.write_committed(u, TYPE, state)) {
+                InputObjectState s = participantStore.read_committed(u, TYPE);
 
                 if (s != null)
                     passed = true;
@@ -76,7 +76,7 @@
 
     public boolean passed = false;
 
-    private ObjectStore store = null;
+    private ParticipantStore participantStore = null;
 }
 
 
@@ -93,7 +93,7 @@
 
         System.setProperty("com.arjuna.ats.internal.arjuna.objectstore.cacheStore.size", cacheSize);
 
-        ObjectStore store = new CacheStore();
+        ParticipantStore store = new CacheStore();
         long stime = Calendar.getInstance().getTime().getTime();
 
         for (int i = 0; (i < threads) && passed; i++) {

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/recovery/ActionTestServer.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/recovery/ActionTestServer.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/recovery/ActionTestServer.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -36,12 +36,9 @@
 
 import com.arjuna.ats.arjuna.AtomicAction;
 import com.arjuna.ats.arjuna.coordinator.AddOutcome;
-import com.arjuna.ats.arjuna.coordinator.TxControl;
 import com.arjuna.ats.arjuna.common.Uid;
 import com.arjuna.ats.arjuna.utils.Utility;
 
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
-
 import org.junit.Test;
 import static org.junit.Assert.*;
 
@@ -249,9 +246,6 @@
             
             _to_client.flush();
 
-            // needed to force TxControl static initialization
-            ObjectStore os = TxControl.getStore();
-
             _transaction_1 = new AtomicAction();
             _transaction_2 = new AtomicAction();
             _transaction_3 = new AtomicAction();

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/recovery/LogMoveTest.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/recovery/LogMoveTest.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/recovery/LogMoveTest.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -33,9 +33,9 @@
 
 import com.arjuna.ats.arjuna.AtomicAction;
 import com.arjuna.ats.arjuna.common.Uid;
-import com.arjuna.ats.arjuna.coordinator.TxControl;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
 import com.arjuna.ats.arjuna.objectstore.StateStatus;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.state.OutputObjectState;
 import com.arjuna.ats.internal.arjuna.common.UidHelper;
 import com.arjuna.ats.internal.arjuna.recovery.ExpiredTransactionScanner;
@@ -48,7 +48,7 @@
     @Test
     public void test()
     {
-        ObjectStore os = TxControl.getStore();
+        RecoveryStore recoveryStore = StoreManager.getRecoveryStore();
         OutputObjectState fluff = new OutputObjectState();
         Uid kungfuTx = new Uid();
         boolean passed = false;
@@ -59,9 +59,9 @@
 
             System.err.println("Creating dummy log");
 
-            os.write_committed(kungfuTx, tn, fluff);
+            recoveryStore.write_committed(kungfuTx, tn, fluff);
 
-            if (os.currentState(kungfuTx, tn) == StateStatus.OS_COMMITTED) {
+            if (recoveryStore.currentState(kungfuTx, tn) == StateStatus.OS_COMMITTED) {
                 System.err.println("Wrote dummy transaction " + kungfuTx);
 
                 // quicker to deal with scanner directly
@@ -72,7 +72,7 @@
                 
                 scanner.scan();
 
-                if (os.currentState(kungfuTx, tn) == StateStatus.OS_COMMITTED)
+                if (recoveryStore.currentState(kungfuTx, tn) == StateStatus.OS_COMMITTED)
                     System.err.println("Transaction log not moved!");
                 else {
                     System.err.println("Transaction log moved!");

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/recovery/RecoverAtomicActionTest.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/recovery/RecoverAtomicActionTest.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/recovery/RecoverAtomicActionTest.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -34,9 +34,9 @@
 import com.arjuna.ats.arjuna.AtomicAction;
 import com.arjuna.ats.arjuna.common.Uid;
 import com.arjuna.ats.arjuna.coordinator.ActionStatus;
-import com.arjuna.ats.arjuna.coordinator.TxControl;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
 import com.arjuna.ats.arjuna.objectstore.StateStatus;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.recovery.RecoverAtomicAction;
 import com.arjuna.ats.arjuna.state.OutputObjectState;
 import com.arjuna.ats.internal.arjuna.common.UidHelper;
@@ -49,7 +49,7 @@
     @Test
     public void test ()
     {
-        ObjectStore os = TxControl.getStore();
+        RecoveryStore recoveryStore = StoreManager.getRecoveryStore();
         OutputObjectState fluff = new OutputObjectState();
         Uid kungfuTx = new Uid();
         boolean passed = false;
@@ -61,9 +61,9 @@
 
             System.err.println("Creating dummy log");
 
-            os.write_committed(kungfuTx, tn, fluff);
+            recoveryStore.write_committed(kungfuTx, tn, fluff);
 
-            if (os.currentState(kungfuTx, tn) == StateStatus.OS_COMMITTED)
+            if (recoveryStore.currentState(kungfuTx, tn) == StateStatus.OS_COMMITTED)
             {
                 System.err.println("Wrote dummy transaction " + kungfuTx);
 
@@ -77,7 +77,7 @@
                     
                     // state should have been moved
                     
-                    if (os.currentState(kungfuTx, tn) == StateStatus.OS_UNKNOWN)
+                    if (recoveryStore.currentState(kungfuTx, tn) == StateStatus.OS_UNKNOWN)
                         passed = true;
                 }
             }

Modified: labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/DefaultStateViewer.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/DefaultStateViewer.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/DefaultStateViewer.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -20,11 +20,12 @@
  */
 package com.arjuna.ats.tools.objectstorebrowser;
 
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
 import com.arjuna.ats.tools.objectstorebrowser.stateviewers.StateViewerInterface;
 import com.arjuna.ats.tools.objectstorebrowser.panels.StatePanel;
 import com.arjuna.ats.tools.objectstorebrowser.panels.ObjectStoreViewEntry;
 import com.arjuna.ats.tools.objectstorebrowser.treenodes.UidNode;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
 import com.arjuna.ats.arjuna.common.Uid;
 import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
 
@@ -49,7 +50,7 @@
      * @param node
      * @throws ObjectStoreException
      */
-    public void uidNodeExpanded(ObjectStore os,
+    public void uidNodeExpanded(ParticipantStore os,
                                 String type,
                                 ObjectStoreBrowserTreeManipulationInterface manipulator,
                                 UidNode node,
@@ -67,7 +68,7 @@
      * @param statePanel
      * @throws ObjectStoreException
      */
-    public void entrySelected(ObjectStore os,
+    public void entrySelected(RecoveryStore os,
                               String type,
                               Uid uid,
                               ObjectStoreViewEntry entry,

Modified: labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/frames/BrowserFrame.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/frames/BrowserFrame.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/frames/BrowserFrame.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -30,6 +30,9 @@
  */
 package com.arjuna.ats.tools.objectstorebrowser.frames;
 
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.tools.objectstorebrowser.panels.*;
 import com.arjuna.ats.tools.objectstorebrowser.ObjectStoreCellRenderer;
 import com.arjuna.ats.tools.objectstorebrowser.treenodes.*;
@@ -42,14 +45,11 @@
 import com.arjuna.ats.tools.objectstorebrowser.ObjectStoreBrowserPlugin;
 import com.arjuna.ats.tools.objectstorebrowser.rootprovider.ObjectStoreRootProvider;
 
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
 import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
 import com.arjuna.ats.arjuna.state.InputObjectState;
 import com.arjuna.ats.arjuna.common.Uid;
 import com.arjuna.ats.arjuna.common.arjPropertyManager;
-import com.arjuna.ats.arjuna.coordinator.TxControl;
 import com.arjuna.ats.internal.arjuna.common.UidHelper;
-import com.arjuna.ats.internal.arjuna.common.UidHelper;
 
 import javax.swing.*;
 import javax.swing.event.*;
@@ -68,8 +68,10 @@
     private static DefaultTreeModel _treeModel = null;
     private static StatePanel _stateViewer = null;
     private static JTree _tree = null;
-    private static ObjectStore _objectStore = null;
 
+    private static RecoveryStore _recoveryStore = null;
+    private static ParticipantStore _participantStore = null;
+
 	private JSplitPane _splitPane = null;
 	private IconPanel _objectView = null;
     private JComboBox _rootCombo = null;
@@ -121,7 +123,8 @@
 
             arjPropertyManager.getObjectStoreEnvironmentBean().setLocalOSRoot(rootStr);
             
-            _objectStore = TxControl.getStore();
+            _recoveryStore = StoreManager.getRecoveryStore();
+            _participantStore = StoreManager.getParticipantStore();
 
             _treeModel = new DefaultTreeModel(createTree());
             _tree = new JTree(_treeModel);
@@ -346,7 +349,8 @@
             _stateViewer.clear();
             _stateViewer.setVisible(false);
             arjPropertyManager.getObjectStoreEnvironmentBean().setLocalOSRoot(objectStoreRoot);
-            _objectStore = TxControl.getStore();
+            _recoveryStore = StoreManager.getRecoveryStore();
+            _participantStore = StoreManager.getParticipantStore();
             _treeModel.setRoot(createTree());
 
             Thread.currentThread().setContextClassLoader(loader);
@@ -362,7 +366,7 @@
 		{
 			InputObjectState types = new InputObjectState();
 
-			if (_objectStore.allTypes(types))
+			if (_recoveryStore.allTypes(types))
 			{
 				String theName;
 
@@ -502,7 +506,7 @@
         {
             try
             {
-                StateViewersRepository.lookupStateViewer(((UidNode)lastNode).getType()).uidNodeExpanded(_objectStore, ((UidNode)lastNode).getType(), (UidNode)lastNode, (UidNode)lastNode, _stateViewer);
+                StateViewersRepository.lookupStateViewer(((UidNode)lastNode).getType()).uidNodeExpanded(_participantStore, ((UidNode)lastNode).getType(), (UidNode)lastNode, (UidNode)lastNode, _stateViewer);
             }
             catch (ObjectStoreException e)
             {
@@ -523,7 +527,7 @@
             {
                 InputObjectState types = new InputObjectState();
 
-                if (_objectStore.allTypes(types))
+                if (_recoveryStore.allTypes(types))
                 {
                     try
                     {
@@ -585,7 +589,7 @@
                 {
                     InputObjectState uids = new InputObjectState();
 
-                    if (_objectStore.allObjUids(theName, uids))
+                    if (_recoveryStore.allObjUids(theName, uids))
                     {
                         Uid theUid = null;
 
@@ -606,7 +610,7 @@
                                     if ( getChildWithName(node, theUid.stringForm()) == null )
                                     {
                                         _treeModel.insertNodeInto(uidNode = new UidNode(theUid.toString(), theUid, theName), node, _treeModel.getChildCount(node));
-                                        uidNode.setIconPanelEntry(new ObjectViewEntry(theName, theUid.toString(), _objectStore.currentState(theUid, theName), uidNode));
+                                        uidNode.setIconPanelEntry(new ObjectViewEntry(theName, theUid.toString(), _recoveryStore.currentState(theUid, theName), uidNode));
                                         _treeModel.insertNodeInto(new DefaultMutableTreeNode(""), uidNode, _treeModel.getChildCount(uidNode));
                                     }
                                     nodesAdded.add(theUid.toString());
@@ -701,9 +705,9 @@
 		}
 	}
 
-    public static ObjectStore getObjectStore()
+    public static RecoveryStore getRecoveryStore()
     {
-        return _objectStore;
+        return _recoveryStore;
     }
 
     public static StatePanel getStatePanel()

Modified: labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/StateViewerInterface.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/StateViewerInterface.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/StateViewerInterface.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -30,9 +30,9 @@
  */
 package com.arjuna.ats.tools.objectstorebrowser.stateviewers;
 
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
 import com.arjuna.ats.tools.objectstorebrowser.*;
 import com.arjuna.ats.tools.objectstorebrowser.panels.StatePanel;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
 import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
 import com.arjuna.ats.tools.objectstorebrowser.treenodes.*;
 
@@ -54,7 +54,7 @@
      * @param node
      * @throws ObjectStoreException
      */
-	public void uidNodeExpanded(ObjectStore os,
+	public void uidNodeExpanded(ParticipantStore os,
                                 String type,
                                 ObjectStoreBrowserTreeManipulationInterface manipulator,
                                 UidNode node,

Modified: labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/ArjunaTransactionWrapper.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/ArjunaTransactionWrapper.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/ArjunaTransactionWrapper.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -24,8 +24,8 @@
 import com.arjuna.ats.arjuna.coordinator.RecordList;
 import com.arjuna.ats.arjuna.common.Uid;
 import com.arjuna.ats.arjuna.ObjectType;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
 import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
 
 import java.util.Collection;
 import java.util.Collections;
@@ -34,23 +34,23 @@
 {
     private String type;
     private UidInfo uidInfo;
-    private ObjectStore os;
+    private ParticipantStore participantStore;
 
     public ArjunaTransactionWrapper(Uid objUid, String type)
     {
         this(null, type, objUid);
     }
 
-    public ArjunaTransactionWrapper(ObjectStore os, String type, Uid objUid)
+    public ArjunaTransactionWrapper(ParticipantStore participantStore, String type, Uid objUid)
     {
         super(objUid, ObjectType.ANDPERSISTENT);
         this.type = type;
-        this.os = os;
+        this.participantStore = participantStore;
         uidInfo = new UidInfo(get_uid(), getClass().getName() + "@" + Integer.toHexString(hashCode()));
         
         try
         {
-            uidInfo.setCommitted(os.read_committed(objUid, type));
+            uidInfo.setCommitted(participantStore.read_committed(objUid, type));
 //            uidInfo.setUncommitted(os.read_uncommitted(objUid, type));
         }
         catch (ObjectStoreException e)
@@ -59,9 +59,9 @@
         }
     }
 
-    public ObjectStore getStore()
+    public ParticipantStore getStore()
     {
-        return os;
+        return participantStore;
     }
 
     /**

Modified: labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/BasicActionInfo.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/BasicActionInfo.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/BasicActionInfo.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -23,7 +23,7 @@
 import com.arjuna.ats.arjuna.coordinator.RecordList;
 import com.arjuna.ats.arjuna.common.Uid;
 import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
 
 import java.util.Collection;
 
@@ -49,5 +49,5 @@
     String type();
     void remove() throws ObjectStoreException;
     boolean isLive();
-    ObjectStore getStore();
+    ParticipantStore getStore();
 }

Modified: labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/atomicaction/AtomicActionViewer.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/atomicaction/AtomicActionViewer.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/atomicaction/AtomicActionViewer.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -30,6 +30,8 @@
  */
 package com.arjuna.ats.tools.objectstorebrowser.stateviewers.viewers.atomicaction;
 
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
 import com.arjuna.ats.tools.objectstorebrowser.stateviewers.StateViewerInterface;
 import com.arjuna.ats.tools.objectstorebrowser.ObjectStoreBrowserTreeManipulationInterface;
 import com.arjuna.ats.tools.objectstorebrowser.treenodes.*;
@@ -39,7 +41,6 @@
 import com.arjuna.ats.tools.objectstorebrowser.stateviewers.viewers.TxInfoViewEntry;
 import com.arjuna.ats.tools.objectstorebrowser.panels.*;
 
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
 import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
 import com.arjuna.ats.arjuna.common.Uid;
 import com.arjuna.ats.arjuna.coordinator.RecordList;
@@ -57,7 +58,7 @@
      * @param uidNode
      * @throws ObjectStoreException
      */
-    public void uidNodeExpanded(ObjectStore os,
+    public void uidNodeExpanded(ParticipantStore os,
                                 String type,
                                 ObjectStoreBrowserTreeManipulationInterface manipulator,
                                 UidNode uidNode,

Modified: labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/atomicaction/AtomicActionWrapper.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/atomicaction/AtomicActionWrapper.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/atomicaction/AtomicActionWrapper.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -22,9 +22,9 @@
 
 import com.arjuna.ats.arjuna.coordinator.RecordList;
 import com.arjuna.ats.arjuna.AtomicAction;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
 import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
 import com.arjuna.ats.arjuna.common.Uid;
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
 import com.arjuna.ats.tools.objectstorebrowser.stateviewers.viewers.XAResourceInfo;
 import com.arjuna.ats.tools.objectstorebrowser.stateviewers.viewers.UidInfo;
 import com.arjuna.ats.tools.objectstorebrowser.stateviewers.viewers.SynchronizationInfo;
@@ -47,17 +47,17 @@
 public class AtomicActionWrapper extends AtomicAction implements BasicActionInfo
 {
     private UidInfo uidInfo;
-    private ObjectStore os;
+    private ParticipantStore participantStore;
 
-    public AtomicActionWrapper(ObjectStore os, String type, Uid objUid)
+    public AtomicActionWrapper(ParticipantStore participantStore, String type, Uid objUid)
     {
         super(objUid);
-        this.os = os;
+        this.participantStore = participantStore;
         uidInfo = new UidInfo(get_uid(), getClass().getName() + "@" + Integer.toHexString(hashCode()));
         
         try
         {
-            uidInfo.setCommitted(os.read_committed(objUid, type));
+            uidInfo.setCommitted(participantStore.read_committed(objUid, type));
 //            uidInfo.setUncommitted(os.read_uncommitted(objUid, type));
         }
         catch (ObjectStoreException e)
@@ -65,9 +65,9 @@
         }
     }
 
-    public ObjectStore getStore()
+    public ParticipantStore getParticipantStore()
     {
-        return os;
+        return participantStore;
     }
     
     public RecordList getFailedList()
@@ -128,7 +128,7 @@
     
     public void remove() throws ObjectStoreException
     {
-        if (!getStore().remove_committed(getSavingUid(), type()))
+        if (!getParticipantStore().remove_committed(getSavingUid(), type()))
             throw new ObjectStoreException();
     }
 

Modified: labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/internal/txoj/lockstore/BasicPersistentLockStore.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/internal/txoj/lockstore/BasicPersistentLockStore.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/internal/txoj/lockstore/BasicPersistentLockStore.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -31,8 +31,8 @@
 
 package com.arjuna.ats.internal.txoj.lockstore;
 
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
 import com.arjuna.ats.txoj.lockstore.LockStore;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
 import com.arjuna.ats.txoj.common.txojPropertyManager;
 import com.arjuna.ats.arjuna.common.Uid;
 import com.arjuna.ats.arjuna.state.*;
@@ -67,9 +67,6 @@
             txojLogger.logger.debug("BasicPersistentLockStore.BasicPersistentLockStore(" + key + ")");
         }
 
-        lockStoreLocation = txojPropertyManager.getTxojEnvironmentBean()
-                .getLockStoreDir();
-
         _key = txojPropertyManager.getTxojEnvironmentBean().getLockStoreDir();
 
         /*
@@ -132,8 +129,5 @@
 
     private String _key;
 
-    private ObjectStore _lockStore;
-
-    private static String lockStoreLocation = null;
-
+    private ParticipantStore _lockStore;
 }

Modified: labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/internal/txoj/recovery/RecoveredTransactionalObject.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/internal/txoj/recovery/RecoveredTransactionalObject.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/internal/txoj/recovery/RecoveredTransactionalObject.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -74,11 +74,11 @@
 
 public class RecoveredTransactionalObject extends StateManager
 {
-    protected RecoveredTransactionalObject(Uid objectUid, String originalType, ObjectStore objectStore)
+    protected RecoveredTransactionalObject(Uid objectUid, String originalType, ParticipantStore participantStore)
     {
         _ourUid = objectUid;
         _type = originalType;
-        _objectStore = objectStore;
+        _participantStore = participantStore;
         _transactionStatusConnectionMgr = new TransactionStatusConnectionManager();
 
         if (txojLogger.logger.isDebugEnabled()) {
@@ -155,7 +155,7 @@
 
         try
         {
-            uncommittedState = _objectStore.read_uncommitted(_ourUid, _type);
+            uncommittedState = _participantStore.read_uncommitted(_ourUid, _type);
         }
         catch (ObjectStoreException e)
         {
@@ -199,7 +199,7 @@
     {
         try
         {
-            _objectStore.remove_uncommitted(_ourUid, _type);
+            _participantStore.remove_uncommitted(_ourUid, _type);
         }
         catch (ObjectStoreException e)
         {
@@ -211,7 +211,7 @@
     {
         try
         {
-            _objectStore.commit_state(_ourUid, _type);
+            _participantStore.commit_state(_ourUid, _type);
         }
         catch (ObjectStoreException e)
         {
@@ -225,7 +225,7 @@
 
     private Uid _originalProcessUid;
 
-    private ObjectStore _objectStore;
+    private ParticipantStore _participantStore;
 
     private String _type;
 

Modified: labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/internal/txoj/recovery/TORecoveryModule.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/internal/txoj/recovery/TORecoveryModule.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/internal/txoj/recovery/TORecoveryModule.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -41,7 +41,6 @@
 
 import java.util.*;
 
-import com.arjuna.ats.arjuna.exceptions.FatalError;
 import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
 import com.arjuna.ats.internal.arjuna.common.UidHelper;
 
@@ -71,17 +70,8 @@
         /*
          * Where are TO's stored. Default.
          */
-      
-        try
-        {
-            Class osc = Class.forName(arjPropertyManager.getObjectStoreEnvironmentBean().getObjectStoreType());
 
-            _objectStore = (ObjectStore) osc.newInstance();
-        }
-        catch (final Throwable ex)
-        {
-            throw new FatalError(txojLogger.i18NLogger.get_recovery_TORecoveryModule_osproblem(), ex);
-        }
+        _objectStore = StoreManager.getTxOJStore();
     }
 
     public void periodicWorkFirstPass ()
@@ -233,7 +223,7 @@
          */
 
         RecoveredTransactionalObject recoveredTO = new RecoveredTransactionalObject(
-                objUid, objType, _objectStore);
+                objUid, objType,_objectStore);
 
         /*
          * Tell it to replayPhase2, in whatever way it does (in fact it won't do
@@ -245,6 +235,6 @@
 
     private Hashtable _uncommittedTOTable;
 
-    private static ObjectStore _objectStore = null;
+    private static ObjectStoreAPI _objectStore = null;
 
 }

Modified: labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/txoj/logging/txojI18NLogger.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/txoj/logging/txojI18NLogger.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/txoj/logging/txojI18NLogger.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -120,8 +120,8 @@
 //	@LogMessage(level = WARN)
 //	public void warn_recovery_TORecoveryModule_8(String arg0, String arg1);
 
-	@Message(id = 15021, value = "TORecoveryModule - could not create ObjectStore instance!", format = MESSAGE_FORMAT)
-	public String get_recovery_TORecoveryModule_osproblem();
+//	@Message(id = 15021, value = "TORecoveryModule - could not create ObjectStore instance!", format = MESSAGE_FORMAT)
+//	public String get_recovery_TORecoveryModule_osproblem();
 
 	@Message(id = 15022, value = "CadaverLockRecord::nestedAbort - no Current!", format = MESSAGE_FORMAT)
 	public String get_CadaverLockRecord_1();

Modified: labs/jbosstm/trunk/ArjunaCore/txoj/tests/classes/com/hp/mwtests/ts/txoj/basic/PersistenceTest.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/txoj/tests/classes/com/hp/mwtests/ts/txoj/basic/PersistenceTest.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/txoj/tests/classes/com/hp/mwtests/ts/txoj/basic/PersistenceTest.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -31,7 +31,7 @@
  * $Id: PersistenceTest.java 2342 2006-03-30 13:06:17Z  $
  */
 
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
 import com.arjuna.ats.arjuna.state.*;
 import com.arjuna.ats.arjuna.common.*;
 
@@ -46,7 +46,7 @@
     @Test
     public void test () throws ObjectStoreException
     {
-        ObjectStore store = new ShadowingStore();
+        ParticipantStore store = new ShadowingStore();
         OutputObjectState state = new OutputObjectState();
         Uid u = new Uid();
 

Modified: labs/jbosstm/trunk/ArjunaCore/txoj/tests/classes/com/hp/mwtests/ts/txoj/recovery/RecoveryModuleUnitTest.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/txoj/tests/classes/com/hp/mwtests/ts/txoj/recovery/RecoveryModuleUnitTest.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/txoj/tests/classes/com/hp/mwtests/ts/txoj/recovery/RecoveryModuleUnitTest.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -31,6 +31,7 @@
 
 package com.hp.mwtests.ts.txoj.recovery;
 
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import org.junit.Test;
 
 import com.arjuna.ats.arjuna.AtomicAction;
@@ -70,7 +71,7 @@
         
         assertTrue(obj.save_state(os, ObjectType.ANDPERSISTENT));
         
-        assertTrue(TxControl.getStore().write_uncommitted(u, obj.type(), os));
+        assertTrue(StoreManager.getParticipantStore().write_uncommitted(u, obj.type(), os));
         
         A.abort();
         

Modified: labs/jbosstm/trunk/ArjunaCore/txoj/tests/classes/com/hp/mwtests/ts/txoj/recovery/RecoveryTest.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/txoj/tests/classes/com/hp/mwtests/ts/txoj/recovery/RecoveryTest.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaCore/txoj/tests/classes/com/hp/mwtests/ts/txoj/recovery/RecoveryTest.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -34,7 +34,8 @@
 import com.arjuna.ats.arjuna.*;
 import com.arjuna.ats.arjuna.common.*;
 import com.arjuna.ats.arjuna.coordinator.TxControl;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.state.OutputObjectState;
 import com.arjuna.ats.internal.txoj.recovery.RecoveredTransactionalObject;
 
@@ -46,9 +47,9 @@
 class MyRecoveredTO extends RecoveredTransactionalObject
 {
     public MyRecoveredTO(Uid objectUid, String originalType,
-            ObjectStore objectStore)
+            ParticipantStore participantStore)
     {
-        super(objectUid, originalType, objectStore);
+        super(objectUid, originalType, participantStore);
     }
     
     public void replay ()
@@ -72,9 +73,9 @@
         
         assertTrue(obj.save_state(os, ObjectType.ANDPERSISTENT));
         
-        assertTrue(TxControl.getStore().write_uncommitted(u, obj.type(), os));
+        assertTrue(StoreManager.getParticipantStore().write_uncommitted(u, obj.type(), os));
         
-        MyRecoveredTO rto = new MyRecoveredTO(u, obj.type(), TxControl.getStore());
+        MyRecoveredTO rto = new MyRecoveredTO(u, obj.type(), StoreManager.getParticipantStore());
         
         rto.replay();
         
@@ -94,9 +95,9 @@
         
         assertTrue(obj.save_state(os, ObjectType.ANDPERSISTENT));
         
-        assertTrue(TxControl.getStore().write_uncommitted(u, obj.type(), os));
+        assertTrue(StoreManager.getParticipantStore().write_uncommitted(u, obj.type(), os));
         
-        MyRecoveredTO rto = new MyRecoveredTO(u, obj.type(), TxControl.getStore());
+        MyRecoveredTO rto = new MyRecoveredTO(u, obj.type(), StoreManager.getParticipantStore());
         
         A.abort();
         

Modified: labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/recovery/arjunacore/JTATransactionLogXAResourceOrphanFilter.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/recovery/arjunacore/JTATransactionLogXAResourceOrphanFilter.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/recovery/arjunacore/JTATransactionLogXAResourceOrphanFilter.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -21,10 +21,10 @@
 package com.arjuna.ats.internal.jta.recovery.arjunacore;
 
 import com.arjuna.ats.arjuna.common.Uid;
-import com.arjuna.ats.arjuna.coordinator.TxControl;
 
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
 import com.arjuna.ats.arjuna.objectstore.StateStatus;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.internal.jta.transaction.arjunacore.AtomicAction;
 import com.arjuna.ats.jta.logging.jtaLogger;
 import com.arjuna.ats.jta.recovery.XAResourceOrphanFilter;
@@ -70,7 +70,7 @@
 	 */
     private boolean transactionLog(Xid xid)
     {
-        ObjectStore transactionStore = TxControl.getStore();
+        RecoveryStore recoveryStore = StoreManager.getRecoveryStore();
         String transactionType = new AtomicAction().type();
 
         XidImple theXid = new XidImple(xid);
@@ -90,7 +90,7 @@
                     jtaLogger.logger.debug("Looking for " + u + " and " + transactionType);
                 }
 
-                if (transactionStore.currentState(u, transactionType) != StateStatus.OS_UNKNOWN)
+                if (recoveryStore.currentState(u, transactionType) != StateStatus.OS_UNKNOWN)
                 {
                     if (jtaLogger.logger.isDebugEnabled()) {
                         jtaLogger.logger.debug("Found record for " + theXid);

Modified: labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/recovery/arjunacore/XARecoveryModule.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/recovery/arjunacore/XARecoveryModule.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/recovery/arjunacore/XARecoveryModule.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -32,8 +32,9 @@
 package com.arjuna.ats.internal.jta.recovery.arjunacore;
 
 import com.arjuna.ats.arjuna.common.*;
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.state.*;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
 import com.arjuna.ats.arjuna.objectstore.StateStatus;
 import com.arjuna.ats.arjuna.coordinator.TxControl;
 import com.arjuna.ats.arjuna.recovery.RecoveryModule;
@@ -113,7 +114,7 @@
 
 		try
 		{
-			if (!_objStore.allObjUids(_recoveryManagerClass.type(), _uids))
+			if (!_recoveryStore.allObjUids(_recoveryManagerClass.type(), _uids))
 			{
                 jtaLogger.i18NLogger.warn_recovery_alluids();
 			}
@@ -240,7 +241,7 @@
 					 * probably recovered it.
 					 */
 
-					if (_objStore.currentState(theUid, _recoveryManagerClass
+					if (_recoveryStore.currentState(theUid, _recoveryManagerClass
 							.type()) != StateStatus.OS_UNKNOWN)
 					{
 						boolean problem = false;
@@ -822,7 +823,7 @@
 			_failures.clear();
 	}
 
-	private ObjectStore _objStore = TxControl.getStore();
+	private RecoveryStore _recoveryStore = StoreManager.getRecoveryStore();
 
 	private InputObjectState _uids = new InputObjectState();
 

Modified: labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/jca/XATerminatorImple.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/jca/XATerminatorImple.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/jca/XATerminatorImple.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -39,8 +39,8 @@
 
 import com.arjuna.ats.arjuna.common.Uid;
 import com.arjuna.ats.arjuna.coordinator.TwoPhaseOutcome;
-import com.arjuna.ats.arjuna.coordinator.TxControl;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.state.InputObjectState;
 import com.arjuna.ats.internal.arjuna.common.UidHelper;
 import com.arjuna.ats.internal.jta.resources.spi.XATerminatorExtensions;
@@ -318,12 +318,12 @@
 
         try
         {
-            ObjectStore objStore = TxControl.getStore();
+            RecoveryStore recoveryStore = StoreManager.getRecoveryStore();
             InputObjectState states = new InputObjectState();
 
             // only look in the JCA section of the object store
 
-            if (objStore.allObjUids(SubordinateAtomicAction.getType(), states)
+            if (recoveryStore.allObjUids(SubordinateAtomicAction.getType(), states)
                     && (states.notempty()))
             {
                 Stack values = new Stack();

Modified: labs/jbosstm/trunk/ArjunaJTA/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/InFlightTransactionViewer.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/InFlightTransactionViewer.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaJTA/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/InFlightTransactionViewer.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -20,6 +20,7 @@
  */
 package com.arjuna.ats.tools.objectstorebrowser.stateviewers.viewers;
 
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
 import com.arjuna.ats.tools.objectstorebrowser.stateviewers.viewers.atomicaction.AtomicActionViewer;
 import com.arjuna.ats.tools.objectstorebrowser.stateviewers.viewers.atomicaction.LiveAtomicActionWrapper;
 import com.arjuna.ats.tools.objectstorebrowser.ObjectStoreBrowserTreeManipulationInterface;
@@ -31,7 +32,6 @@
 import com.arjuna.ats.tools.objectstorebrowser.treenodes.UidNode;
 import com.arjuna.ats.tools.objectstorebrowser.treenodes.ListNode;
 import com.arjuna.ats.tools.toolsframework.plugin.ToolPluginException;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
 import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
 import com.arjuna.ats.arjuna.common.Uid;
 import com.arjuna.ats.jta.transaction.Transaction;
@@ -52,7 +52,7 @@
         ObjectStoreBrowserPlugin.getRootProvider().addRoot(InFlightTransactionPseudoStore.STORE_NAME);
     }
 
-    public void uidNodeExpanded(ObjectStore os,
+    public void uidNodeExpanded(ParticipantStore os,
                                 String type,
                                 ObjectStoreBrowserTreeManipulationInterface manipulator,
                                 UidNode uidNode,

Modified: labs/jbosstm/trunk/ArjunaJTA/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/arjunatransaction/ArjunaTransactionViewer.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/arjunatransaction/ArjunaTransactionViewer.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaJTA/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/stateviewers/viewers/arjunatransaction/ArjunaTransactionViewer.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -20,6 +20,7 @@
  */
 package com.arjuna.ats.tools.objectstorebrowser.stateviewers.viewers.arjunatransaction;
 
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
 import com.arjuna.ats.tools.objectstorebrowser.stateviewers.viewers.arjunatransaction.icons.*;
 import com.arjuna.ats.tools.objectstorebrowser.stateviewers.viewers.arjunatransaction.nodes.*;
 import com.arjuna.ats.tools.objectstorebrowser.stateviewers.viewers.TxInfoNode;
@@ -32,7 +33,6 @@
 import com.arjuna.ats.tools.objectstorebrowser.treenodes.UidNode;
 import com.arjuna.ats.tools.objectstorebrowser.treenodes.ListNode;
 import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
 import com.arjuna.ats.arjuna.common.Uid;
 import com.arjuna.ats.arjuna.coordinator.RecordList;
 
@@ -60,7 +60,7 @@
      * @param uidNode
      * @throws ObjectStoreException
      */
-    public void uidNodeExpanded(ObjectStore os,
+    public void uidNodeExpanded(ParticipantStore os,
                                 String type,
                                 ObjectStoreBrowserTreeManipulationInterface manipulator,
                                 UidNode uidNode,

Modified: labs/jbosstm/trunk/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/resources/jts/orbspecific/XAResourceRecord.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/resources/jts/orbspecific/XAResourceRecord.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/resources/jts/orbspecific/XAResourceRecord.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -31,6 +31,8 @@
 
 package com.arjuna.ats.internal.jta.resources.jts.orbspecific;
 
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.jta.recovery.*;
 
 import com.arjuna.ats.jta.common.jtaPropertyManager;
@@ -48,7 +50,6 @@
 import com.arjuna.ats.arjuna.coordinator.TwoPhaseOutcome;
 import com.arjuna.ats.arjuna.coordinator.TxControl;
 import com.arjuna.ats.arjuna.state.*;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
 import com.arjuna.ats.arjuna.coordinator.RecordType;
 
 import com.arjuna.ats.jts.utils.Utility;
@@ -117,7 +118,7 @@
 		_prepared = false;
 		_committed = false;
 		_heuristic = TwoPhaseOutcome.FINISH_OK;
-		_objStore = null;
+		_participantStore = null;
 		_theUid = new Uid();
 		_theReference = null;
 		_recoveryCoordinator = null;
@@ -146,7 +147,7 @@
             _prepared = true;
             _committed = false;
             _heuristic = TwoPhaseOutcome.FINISH_OK;
-            _objStore = null;
+            _participantStore = null;
             _theUid = new Uid();
             _theReference = null;
             _recoveryCoordinator = null;
@@ -1043,7 +1044,7 @@
 		_committed = false;
 		_heuristic = TwoPhaseOutcome.FINISH_OK;
 		_theUid = new Uid(u);
-		_objStore = null;
+		_participantStore = null;
 		_valid = false;
 		_theReference = null;
 		_recoveryCoordinator = null;
@@ -1155,8 +1156,8 @@
 
 	private final void setObjectStore()
 	{
-		if (_objStore == null)
-		    _objStore = TxControl.getStore();
+		if (_participantStore == null)
+		    _participantStore = StoreManager.getParticipantStore();
 	}
 
 	private final boolean createState()
@@ -1164,7 +1165,7 @@
 		setObjectStore();
 
 		if ((_theXAResource != null) && (_tranID != null)
-				&& (_objStore != null))
+				&& (_participantStore != null))
 		{
 			OutputObjectState os = new OutputObjectState();
 
@@ -1172,7 +1173,7 @@
 			{
 				try
 				{
-					_valid = _objStore.write_committed(_theUid, type(), os);
+					_valid = _participantStore.write_committed(_theUid, type(), os);
 					_prepared = true;
 				}
 				catch (Exception e)
@@ -1205,7 +1206,7 @@
 			{
 				try
 				{
-					_valid = _objStore.write_committed(_theUid, type(), os);
+					_valid = _participantStore.write_committed(_theUid, type(), os);
 				}
 				catch (Exception e)
 				{
@@ -1231,7 +1232,7 @@
 
 		try
 		{
-			os = _objStore.read_committed(_theUid, type());
+			os = _participantStore.read_committed(_theUid, type());
 		}
 		catch (Exception e)
 		{
@@ -1260,7 +1261,7 @@
 		{
 			try
 			{
-				_valid = _objStore.remove_committed(_theUid, type());
+				_valid = _participantStore.remove_committed(_theUid, type());
 			}
 			catch (Exception e)
 			{
@@ -1371,7 +1372,7 @@
 	private boolean _committed;
 	private boolean _valid;
 	private int _heuristic;
-	private ObjectStore _objStore;
+	private ParticipantStore _participantStore;
 	private Uid _theUid;
 	private org.omg.CosTransactions.Resource _theReference;
 	private org.omg.CosTransactions.RecoveryCoordinator _recoveryCoordinator;

Modified: labs/jbosstm/trunk/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts/jca/XATerminatorImple.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts/jca/XATerminatorImple.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts/jca/XATerminatorImple.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -39,8 +39,8 @@
 
 import com.arjuna.ats.arjuna.common.Uid;
 import com.arjuna.ats.arjuna.coordinator.TwoPhaseOutcome;
-import com.arjuna.ats.arjuna.coordinator.TxControl;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.state.InputObjectState;
 import com.arjuna.ats.internal.arjuna.common.UidHelper;
 import com.arjuna.ats.internal.jta.resources.spi.XATerminatorExtensions;
@@ -251,12 +251,12 @@
 
         try
         {
-            ObjectStore objStore = TxControl.getStore();
+            RecoveryStore recoveryStore = StoreManager.getRecoveryStore();
             InputObjectState states = new InputObjectState();
 
             // only look in the JCA section of the object store
 
-            if (objStore.allObjUids(ServerTransaction.getType(), states)
+            if (recoveryStore.allObjUids(ServerTransaction.getType(), states)
                     && (states.notempty()))
             {
                 Stack values = new Stack();

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/interposition/ServerFactory.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/interposition/ServerFactory.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/interposition/ServerFactory.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -31,6 +31,8 @@
 
 package com.arjuna.ats.internal.jts.interposition;
 
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.jts.logging.*;
 
 import com.arjuna.ats.internal.jts.orbspecific.interposition.*;
@@ -39,7 +41,6 @@
 import com.arjuna.ats.internal.jts.orbspecific.coordinator.ArjunaTransactionImple;
 
 import com.arjuna.ats.arjuna.common.Uid;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
 import com.arjuna.ats.arjuna.objectstore.StateStatus;
 import com.arjuna.ats.arjuna.coordinator.TransactionReaper;
 
@@ -178,7 +179,7 @@
 		{
 			// if here then it is not active, so look in the object store
 
-			ObjectStore store = com.arjuna.ats.arjuna.coordinator.TxControl.getStore();
+			RecoveryStore store = StoreManager.getRecoveryStore();
 
 			try
 			{

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/orbspecific/TransactionFactoryImple.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/orbspecific/TransactionFactoryImple.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/orbspecific/TransactionFactoryImple.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -31,6 +31,8 @@
 
 package com.arjuna.ats.internal.jts.orbspecific;
 
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.internal.arjuna.common.UidHelper;
 import com.arjuna.ats.internal.jts.orbspecific.coordinator.ArjunaTransactionImple;
 import com.arjuna.ats.internal.jts.orbspecific.interposition.*;
@@ -43,7 +45,6 @@
 import com.arjuna.ats.jts.utils.Utility;
 import com.arjuna.ats.jts.logging.*;
 
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
 import com.arjuna.ats.arjuna.objectstore.StateStatus;
 import com.arjuna.ats.arjuna.coordinator.BasicAction;
 import com.arjuna.ats.arjuna.coordinator.ActionStatus;
@@ -566,7 +567,7 @@
 		{
 			// if here then it is not active, so look in the object store
 
-			ObjectStore store = com.arjuna.ats.arjuna.coordinator.TxControl.getStore();
+			RecoveryStore recoveryStore = StoreManager.getRecoveryStore();
 
 			try
 			{
@@ -576,7 +577,7 @@
 				 * certainty what the status is of the root coordinator.
 				 */
 
-				int status = store.currentState(u, ArjunaTransactionImple.typeName());
+				int status = recoveryStore.currentState(u, ArjunaTransactionImple.typeName());
 
 				switch (status)
 				{

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/orbspecific/jacorb/recoverycoordinators/JacOrbRCManager.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/orbspecific/jacorb/recoverycoordinators/JacOrbRCManager.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/orbspecific/jacorb/recoverycoordinators/JacOrbRCManager.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -32,6 +32,8 @@
 
 package com.arjuna.ats.internal.jts.orbspecific.jacorb.recoverycoordinators;
 
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import org.omg.CORBA.*;
 import org.omg.PortableServer.*;
 import org.omg.CosTransactions.*;
@@ -47,11 +49,8 @@
 import com.arjuna.ats.internal.jts.ORBManager;
 
 import com.arjuna.ats.arjuna.coordinator.TxControl;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
 import com.arjuna.ats.arjuna.state.*;
 
-import java.lang.Object;
-
 /**
  * Implementation of RecoveryCreator for JacOrb
  * Handles the creation of RecoveryCoordinator objects for
@@ -153,12 +152,12 @@
 		try
 		{
 		    //Retrieve from Object Store
-		    if (currentStore == null)
+		    if (participantStore == null)
 		    {
-			currentStore = TxControl.getStore();
+			participantStore = StoreManager.getParticipantStore();
 		    }
 
-		    InputObjectState iState = currentStore.read_committed(new Uid( JacOrbRCServiceInit.uid4Recovery), JacOrbRCServiceInit.type());
+		    InputObjectState iState = participantStore.read_committed(new Uid( JacOrbRCServiceInit.uid4Recovery), JacOrbRCServiceInit.type());
 
             if (iState != null)
                 ref_ReCoo = iState.unpackString();
@@ -184,7 +183,7 @@
     private static boolean _runWithoutDaemon = false;
     private static boolean _initialised = false;
 
-    private ObjectStore     currentStore;
+    private ParticipantStore participantStore;
 
     static
     {

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/orbspecific/jacorb/recoverycoordinators/JacOrbRCServiceInit.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/orbspecific/jacorb/recoverycoordinators/JacOrbRCServiceInit.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/orbspecific/jacorb/recoverycoordinators/JacOrbRCServiceInit.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -33,6 +33,8 @@
 package com.arjuna.ats.internal.jts.orbspecific.jacorb.recoverycoordinators;
 
 import com.arjuna.ats.arjuna.common.*;
+import com.arjuna.ats.arjuna.objectstore.ParticipantStore;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.internal.jts.recovery.recoverycoordinators.*;
 
 import com.arjuna.ats.jts.logging.*;
@@ -52,7 +54,6 @@
 import org.omg.CosTransactions.*;
 
 import com.arjuna.ats.arjuna.coordinator.TxControl;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
 import com.arjuna.ats.arjuna.state.*;
 
 import java.io.IOException;
@@ -247,14 +248,14 @@
 
                 try
                     {
-                        if (currentStore == null)
+                        if (participantStore == null)
                         {
-                            currentStore = TxControl.getStore();
+                            participantStore = StoreManager.getParticipantStore();
                         }
 
                         OutputObjectState oState = new OutputObjectState();
                         oState.packString(reference);
-                        currentStore.write_committed( new Uid(uid4Recovery), type(), oState);
+                        participantStore.write_committed( new Uid(uid4Recovery), type(), oState);
                     }
                 catch ( java.lang.SecurityException sex )
                 {
@@ -304,8 +305,8 @@
     private static final String orbNamePrefix = "ots_";
     private static final String orbName = "arjuna.portable_interceptor.";
 
-    private ObjectStore     currentStore;
+    private ParticipantStore participantStore;
 
     static protected String uid4Recovery = "0:ffff52e38d0c:c91:4140398c:0";
 
-};
\ No newline at end of file
+}
\ No newline at end of file

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/contact/ExpiredContactScanner.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/contact/ExpiredContactScanner.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/contact/ExpiredContactScanner.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -56,7 +56,7 @@
 	if (jtsLogger.logger.isDebugEnabled()) {
         jtsLogger.logger.debug("ExpiredContactScanner created, with expiry time of "+_expiryTime+" seconds");
     }
-	_objectStore  = FactoryContactItem.getStore();
+	_recoveryStore = StoreManager.getRecoveryStore();
 	_itemTypeName = FactoryContactItem.getTypeName();
     
     }
@@ -79,7 +79,7 @@
 	    InputObjectState uids = new InputObjectState();
 	    
 	    // find the uids of all the contact items
-	    if (_objectStore.allObjUids(_itemTypeName, uids))
+	    if (_recoveryStore.allObjUids(_itemTypeName, uids))
 	    {
 		Uid theUid = null;
 
@@ -103,7 +103,7 @@
 			    if (timeOfDeath != null && timeOfDeath.before(oldestSurviving)) 
 			    {
                     jtsLogger.i18NLogger.info_recovery_ExpiredContactScanner_3(newUid);
-				_objectStore.remove_committed(newUid, _itemTypeName);
+				_recoveryStore.remove_committed(newUid, _itemTypeName);
 			    }
 			}
 		    }
@@ -122,7 +122,7 @@
     }
 
     private String	 _itemTypeName;
-    private ObjectStore _objectStore;
+    private RecoveryStore _recoveryStore;
     private static int _expiryTime = 12 *60*60; // default is 12 hours
     private static SimpleDateFormat    _timeFormat = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss");
 

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/contact/FactoryContactItem.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/contact/FactoryContactItem.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/contact/FactoryContactItem.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -59,7 +59,6 @@
 
 private static final String _pseudoTypeName = "/Recovery/FactoryContact";
 private static final int    version = 1;
-private static ObjectStore  _objectStore = null;
 
 private static FactoryContactItem _theSingularItem = null;
 
@@ -109,12 +108,9 @@
 
 /*  provide information for other classes (and ourselves) in this package
  */
-static ObjectStore getStore()
+static RecoveryStore getStore()
 {
-    if ( _objectStore == null ) {
-	_objectStore = TxControl.getStore();
-    }
-    return _objectStore;
+    return StoreManager.getRecoveryStore();
 }
 
 

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/ExpiredAssumedCompleteScanner.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/ExpiredAssumedCompleteScanner.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/ExpiredAssumedCompleteScanner.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -31,14 +31,13 @@
 
 package com.arjuna.ats.internal.jts.recovery.transactions;
 
-import org.omg.CosTransactions.*;
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
 
 import java.util.*;
 import java.text.*;
 
 import com.arjuna.ats.arjuna.common.Uid ;
 import com.arjuna.ats.arjuna.common.recoveryPropertyManager;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore ;
 import com.arjuna.ats.arjuna.recovery.ExpiryScanner ;
 import com.arjuna.ats.arjuna.state.InputObjectState ;
 
@@ -60,14 +59,14 @@
 	// unused
     }
 
-    protected ExpiredAssumedCompleteScanner (String typeName, ObjectStore objectStore)
+    protected ExpiredAssumedCompleteScanner (String typeName, RecoveryStore recoveryStore)
     {
 
 	if (jtsLogger.logger.isDebugEnabled()) {
         jtsLogger.logger.debug("ExpiredAssumedCompleteScanner created, with expiry time of "+_expiryTime+" seconds");
     }
 	
-	_objectStore  = objectStore;
+	_recoveryStore = recoveryStore;
 	_typeName = typeName;
 	
     }
@@ -89,7 +88,7 @@
 	    InputObjectState uids = new InputObjectState();
 	    
 	    // find the uids of all the contact items
-	    if (_objectStore.allObjUids(_typeName, uids))
+	    if (_recoveryStore.allObjUids(_typeName, uids))
 	    {
 		Uid theUid = null;
 
@@ -120,7 +119,7 @@
 
                     jtsLogger.i18NLogger.info_arjuna_recovery_ExpiredAssumedCompleteScanner_3(newUid);
 				
-				_objectStore.remove_committed(newUid, _typeName);
+				_recoveryStore.remove_committed(newUid, _typeName);
 			    }
 			}
 		    }
@@ -141,7 +140,7 @@
     }
 
     private String	 _typeName;
-    private ObjectStore _objectStore;
+    private RecoveryStore _recoveryStore;
     private static int _expiryTime = 240 *60*60; // default is 240 hours
     private static SimpleDateFormat    _timeFormat = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss");
 

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/ExpiredServerScanner.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/ExpiredServerScanner.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/ExpiredServerScanner.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -49,7 +49,7 @@
      */
     public ExpiredServerScanner ()
     {
-	super(AssumedCompleteServerTransaction.typeName(),TxControl.getStore());
+	super(AssumedCompleteServerTransaction.typeName(),StoreManager.getRecoveryStore());
     
     }
 }

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/ExpiredToplevelScanner.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/ExpiredToplevelScanner.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/ExpiredToplevelScanner.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -55,7 +55,7 @@
      */
     public ExpiredToplevelScanner ()
     {
-	super(AssumedCompleteTransaction.typeName(),TxControl.getStore());
+	super(AssumedCompleteTransaction.typeName(),StoreManager.getRecoveryStore());
     
     }
 }

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/RecoveredServerTransaction.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/RecoveredServerTransaction.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/RecoveredServerTransaction.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -116,7 +116,7 @@
 
         try
         {
-            if ((store().currentState(getSavingUid(), effectiveTypeName) != StateStatus.OS_UNKNOWN))
+            if ((StoreManager.getRecoveryStore().currentState(getSavingUid(), effectiveTypeName) != StateStatus.OS_UNKNOWN))
             {
                 /*
                  * By activating the state we get the actual transaction id and
@@ -377,7 +377,7 @@
     {
         try
         {
-            store().remove_committed(getSavingUid(), super.type());
+            getStore().remove_committed(getSavingUid(), super.type());
         }
         catch (ObjectStoreException ex)
         {

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/RecoveredTransaction.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/RecoveredTransaction.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/RecoveredTransaction.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -96,7 +96,7 @@
 
         try
         {
-            if ((store().currentState(actionUid, effectiveTypeName) != StateStatus.OS_UNKNOWN))
+            if ((StoreManager.getRecoveryStore().currentState(actionUid, effectiveTypeName) != StateStatus.OS_UNKNOWN))
             {
                 if (activate())
                     _recoveryStatus = RecoveryStatus.ACTIVATED;
@@ -271,7 +271,7 @@
     {
         try
         {
-            store().remove_committed(get_uid(), super.type());
+            getStore().remove_committed(get_uid(), super.type());
         }
         catch (ObjectStoreException ex) {
             jtsLogger.i18NLogger.warn_recovery_transactions_RecoveredTransaction_8(ex);

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/ServerTransactionRecoveryModule.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/ServerTransactionRecoveryModule.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/ServerTransactionRecoveryModule.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -38,18 +38,13 @@
 import com.arjuna.ats.internal.jts.orbspecific.interposition.coordinator.ServerTransaction;
 
 import com.arjuna.ats.arjuna.common.*;
-import com.arjuna.ats.arjuna.coordinator.*;
 import com.arjuna.ats.arjuna.objectstore.*;
-import com.arjuna.ats.arjuna.*;
-import com.arjuna.ats.arjuna.state.*;
 import com.arjuna.ats.jts.utils.*;
 import com.arjuna.ats.arjuna.exceptions.*;
 import com.arjuna.ats.arjuna.recovery.RecoveryModule;
 
 import com.arjuna.ats.jts.logging.jtsLogger;
 
-import java.io.IOException;
-
 /**
  * This class is a plug-in module for the recovery manager.
  * It is responsible for the recovery of server transactions
@@ -95,7 +90,7 @@
 		try
 		    {
 		     // Is the intentions list still there? Is this the best way to check?
-		     if (_transactionStore.currentState(currentUid, _transactionType) != StateStatus.OS_UNKNOWN)
+		     if (_recoveryStore.currentState(currentUid, _transactionType) != StateStatus.OS_UNKNOWN)
 		       {
                    jtsLogger.i18NLogger.info_recovery_transactions_ServerTransactionRecoveryModule_5(currentUid);
     			   recoverTransaction(currentUid);

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/TransactionRecoveryModule.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/TransactionRecoveryModule.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/TransactionRecoveryModule.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -36,7 +36,6 @@
 import java.util.*;
 
 import com.arjuna.ats.arjuna.common.*;
-import com.arjuna.ats.arjuna.coordinator.*;
 import com.arjuna.ats.arjuna.objectstore.*;
 import com.arjuna.ats.arjuna.state.*;
 import com.arjuna.ats.internal.arjuna.common.UidHelper;
@@ -62,9 +61,9 @@
         jtsLogger.logger.debug("TransactionRecoveryModule created");
     }
 
-	if (_transactionStore == null)
+	if (_recoveryStore == null)
 	{
-	    _transactionStore = TxControl.getStore();
+	    _recoveryStore = StoreManager.getRecoveryStore();
 	}
     }
 
@@ -92,7 +91,7 @@
             jtsLogger.logger.debug("TransactionRecoveryModule: scanning for "+_transactionType);
         }
 
-	    anyTransactions = _transactionStore.allObjUids(_transactionType, uids);
+	    anyTransactions = _recoveryStore.allObjUids(_transactionType, uids);
 	}
 	catch (ObjectStoreException e1)
 	{
@@ -153,7 +152,7 @@
 	    try
 	    {
 		// Is the intentions list still there? Is this the best way to check?
-		if (_transactionStore.currentState(currentUid, _transactionType) != StateStatus.OS_UNKNOWN)
+		if (_recoveryStore.currentState(currentUid, _transactionType) != StateStatus.OS_UNKNOWN)
 		{
             jtsLogger.i18NLogger.info_recovery_transactions_TransactionRecoveryModule_6(currentUid);
 
@@ -218,11 +217,11 @@
     }
 
     protected String	   _transactionType = null;
-    //private static ObjectStore _transactionStore = null;
+    //private static ObjectStore _recoveryStore = null;
 
     //private Vector	     _transactionUidVector;
 
-    protected static ObjectStore _transactionStore = null;
+    protected static RecoveryStore _recoveryStore = null;
 
     protected Vector	     _transactionUidVector;
 

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/utils/TxStoreLog.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/utils/TxStoreLog.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/utils/TxStoreLog.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -31,18 +31,12 @@
 
 package com.arjuna.ats.internal.jts.utils;
 
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.state.*;
-import com.arjuna.ats.arjuna.coordinator.TxControl;
 import com.arjuna.ats.arjuna.exceptions.*;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
 import com.arjuna.ats.arjuna.objectstore.StateStatus;
 
-import com.arjuna.ats.internal.jts.orbspecific.interposition.ServerControl;
-
-import org.omg.CosTransactions.*;
-
-import com.arjuna.ArjunaOTS.*;
-
 public class TxStoreLog
 {
 
@@ -53,11 +47,11 @@
  
     public static boolean getTransactions (InputObjectState os, int status)
     {
-	ObjectStore store = TxControl.getStore();
+	RecoveryStore recoveryStore = StoreManager.getRecoveryStore();
 
 	try
 	{
-	    return store.allObjUids(com.arjuna.ats.internal.jts.orbspecific.coordinator.ArjunaTransactionImple.typeName(), os, status);
+	    return recoveryStore.allObjUids(com.arjuna.ats.internal.jts.orbspecific.coordinator.ArjunaTransactionImple.typeName(), os, status);
 	}
 	catch (NullPointerException ex)
 	{

Modified: labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/coordinator/at/ATCoordinatorRecoveryModule.java
===================================================================
--- labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/coordinator/at/ATCoordinatorRecoveryModule.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/coordinator/at/ATCoordinatorRecoveryModule.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -20,7 +20,9 @@
  */
 package org.jboss.jbossts.xts.recovery.coordinator.at;
 
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
 import com.arjuna.ats.arjuna.objectstore.StateStatus;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import org.jboss.jbossts.xts.logging.XTSLogger;
 import org.jboss.jbossts.xts.recovery.participant.at.XTSATRecoveryManager;
 
@@ -31,7 +33,6 @@
 import com.arjuna.ats.arjuna.state.InputObjectState;
 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.mwlabs.wscf.model.twophase.arjunacore.ATCoordinator;
@@ -55,9 +56,9 @@
             XTSLogger.logger.debug("ATCoordinatorRecoveryModule created - default");
         }
 
-        if (_transactionStore == null)
+        if (_recoveryStore == null)
         {
-            _transactionStore = TxControl.getStore() ;
+            _recoveryStore = StoreManager.getRecoveryStore();
         }
 
         _transactionStatusConnectionMgr = new TransactionStatusConnectionManager() ;
@@ -97,7 +98,7 @@
                 XTSLogger.logger.debug("StatusModule: first pass ");
             }
 
-            ACCoordinators = _transactionStore.allObjUids( _transactionType, acc_uids );
+            ACCoordinators = _recoveryStore.allObjUids( _transactionType, acc_uids );
 
         }
         catch ( ObjectStoreException ex )
@@ -131,9 +132,9 @@
             XTSLogger.logger.debug("ATCoordinatorRecoveryModule created " + type);
         }
 
-        if (_transactionStore == null)
+        if (_recoveryStore == null)
         {
-            _transactionStore = TxControl.getStore() ;
+            _recoveryStore = StoreManager.getRecoveryStore();
         }
 
         _transactionStatusConnectionMgr = new TransactionStatusConnectionManager() ;
@@ -266,7 +267,7 @@
 
             try
             {
-                if ( _transactionStore.currentState( currentUid, _transactionType ) != StateStatus.OS_UNKNOWN )
+                if ( _recoveryStore.currentState( currentUid, _transactionType ) != StateStatus.OS_UNKNOWN )
                 {
                     doRecoverTransaction( currentUid ) ;
                 }
@@ -288,7 +289,7 @@
     private Vector _transactionUidVector = null ;
 
     // Reference to the Object Store.
-    private static ObjectStore _transactionStore = null ;
+    private static RecoveryStore _recoveryStore = null ;
 
     // This object manages the interface to all TransactionStatusManagers
     // processes(JVMs) on this system/node.

Modified: labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/coordinator/at/SubordinateATCoordinatorRecoveryModule.java
===================================================================
--- labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/coordinator/at/SubordinateATCoordinatorRecoveryModule.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/coordinator/at/SubordinateATCoordinatorRecoveryModule.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -20,7 +20,9 @@
  */
 package org.jboss.jbossts.xts.recovery.coordinator.at;
 
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
 import com.arjuna.ats.arjuna.objectstore.StateStatus;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import org.jboss.jbossts.xts.logging.XTSLogger;
 import org.jboss.jbossts.xts.recovery.participant.at.XTSATRecoveryManager;
 
@@ -31,7 +33,6 @@
 import com.arjuna.ats.arjuna.state.InputObjectState;
 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.mwlabs.wscf.model.twophase.arjunacore.subordinate.SubordinateATCoordinator;
@@ -55,9 +56,9 @@
             XTSLogger.logger.debug("SubordinateATCoordinatorRecoveryModule created - default");
         }
 
-        if (_transactionStore == null)
+        if (_recoveryStore == null)
         {
-            _transactionStore = TxControl.getStore() ;
+            _recoveryStore = StoreManager.getRecoveryStore();
         }
 
         _transactionStatusConnectionMgr = new TransactionStatusConnectionManager() ;
@@ -97,7 +98,7 @@
                 XTSLogger.logger.debug("StatusModule: first pass ");
             }
 
-            SubordinateCoordinators = _transactionStore.allObjUids( _transactionType, acc_uids );
+            SubordinateCoordinators = _recoveryStore.allObjUids( _transactionType, acc_uids );
 
         }
         catch ( ObjectStoreException ex )
@@ -131,9 +132,9 @@
             XTSLogger.logger.debug("SubordinateATCoordinatorRecoveryModule created " + type);
         }
 
-        if (_transactionStore == null)
+        if (_recoveryStore == null)
         {
-            _transactionStore = TxControl.getStore() ;
+            _recoveryStore = StoreManager.getRecoveryStore();
         }
 
         _transactionStatusConnectionMgr = new TransactionStatusConnectionManager() ;
@@ -269,7 +270,7 @@
 
             try
             {
-                if ( _transactionStore.currentState( currentUid, _transactionType ) != StateStatus.OS_UNKNOWN )
+                if ( _recoveryStore.currentState( currentUid, _transactionType ) != StateStatus.OS_UNKNOWN )
                 {
                     doRecoverTransaction( currentUid ) ;
                 }
@@ -291,7 +292,7 @@
     private Vector _transactionUidVector = null ;
 
     // Reference to the Object Store.
-    private static ObjectStore _transactionStore = null ;
+    private static RecoveryStore _recoveryStore = null ;
 
     // This object manages the interface to all TransactionStatusManagers
     // processes(JVMs) on this system/node.

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	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/coordinator/ba/BACoordinatorRecoveryModule.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -20,7 +20,9 @@
  */
 package org.jboss.jbossts.xts.recovery.coordinator.ba;
 
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
 import com.arjuna.ats.arjuna.objectstore.StateStatus;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import org.jboss.jbossts.xts.logging.XTSLogger;
 import org.jboss.jbossts.xts.recovery.participant.ba.XTSBARecoveryManager;
 
@@ -31,7 +33,6 @@
 import com.arjuna.ats.arjuna.state.InputObjectState;
 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.mwlabs.wscf.model.sagas.arjunacore.BACoordinator;
@@ -55,9 +56,9 @@
             XTSLogger.logger.debug("BACoordinatorRecoveryModule created - default");
         }
 
-        if (_transactionStore == null)
+        if (_recoveryStore == null)
         {
-            _transactionStore = TxControl.getStore() ;
+            _recoveryStore = StoreManager.getRecoveryStore();
         }
 
         _transactionStatusConnectionMgr = new TransactionStatusConnectionManager() ;
@@ -97,7 +98,7 @@
                 XTSLogger.logger.debug("BACoordinatorRecoveryModule: first pass");
             }
 
-            ACCoordinators = _transactionStore.allObjUids( _transactionType, acc_uids );
+            ACCoordinators = _recoveryStore.allObjUids( _transactionType, acc_uids );
 
         }
         catch ( ObjectStoreException ex )
@@ -131,9 +132,9 @@
             XTSLogger.logger.debug("BACoordinatorRecoveryModule created " + type);
         }
 
-        if (_transactionStore == null)
+        if (_recoveryStore == null)
         {
-            _transactionStore = TxControl.getStore() ;
+            _recoveryStore = StoreManager.getRecoveryStore();
         }
 
         _transactionStatusConnectionMgr = new TransactionStatusConnectionManager() ;
@@ -265,7 +266,7 @@
 
             try
             {
-                if ( _transactionStore.currentState( currentUid, _transactionType ) != StateStatus.OS_UNKNOWN )
+                if ( _recoveryStore.currentState( currentUid, _transactionType ) != StateStatus.OS_UNKNOWN )
                 {
                     doRecoverTransaction( currentUid ) ;
                 }
@@ -287,7 +288,7 @@
     private Vector _transactionUidVector = null ;
 
     // Reference to the Object Store.
-    private static ObjectStore _transactionStore = null ;
+    private static RecoveryStore _recoveryStore = null ;
 
     // This object manages the interface to all TransactionStatusManagers
     // processes(JVMs) on this system/node.

Modified: labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/coordinator/ba/SubordinateBACoordinatorRecoveryModule.java
===================================================================
--- labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/coordinator/ba/SubordinateBACoordinatorRecoveryModule.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/coordinator/ba/SubordinateBACoordinatorRecoveryModule.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -20,7 +20,9 @@
  */
 package org.jboss.jbossts.xts.recovery.coordinator.ba;
 
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
 import com.arjuna.ats.arjuna.objectstore.StateStatus;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import org.jboss.jbossts.xts.logging.XTSLogger;
 import org.jboss.jbossts.xts.recovery.participant.ba.XTSBARecoveryManager;
 
@@ -31,7 +33,6 @@
 import com.arjuna.ats.arjuna.state.InputObjectState;
 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.mwlabs.wscf.model.sagas.arjunacore.subordinate.SubordinateBACoordinator;
@@ -55,9 +56,9 @@
             XTSLogger.logger.debug("SubordinateBACoordinatorRecoveryModule created - default");
         }
 
-        if (_transactionStore == null)
+        if (_recoveryStore == null)
         {
-            _transactionStore = TxControl.getStore() ;
+            _recoveryStore = StoreManager.getRecoveryStore();
         }
 
         _transactionStatusConnectionMgr = new TransactionStatusConnectionManager() ;
@@ -97,7 +98,7 @@
                 XTSLogger.logger.debug("StatusModule: first pass ");
             }
 
-            SubordinateCoordinators = _transactionStore.allObjUids( _transactionType, acc_uids );
+            SubordinateCoordinators = _recoveryStore.allObjUids( _transactionType, acc_uids );
 
         }
         catch ( ObjectStoreException ex )
@@ -131,9 +132,9 @@
             XTSLogger.logger.debug("SubordinateBACoordinatorRecoveryModule created " + type);
         }
 
-        if (_transactionStore == null)
+        if (_recoveryStore == null)
         {
-            _transactionStore = TxControl.getStore() ;
+            _recoveryStore = StoreManager.getRecoveryStore();
         }
 
         _transactionStatusConnectionMgr = new TransactionStatusConnectionManager() ;
@@ -269,7 +270,7 @@
 
             try
             {
-                if ( _transactionStore.currentState( currentUid, _transactionType ) != StateStatus.OS_UNKNOWN )
+                if ( _recoveryStore.currentState( currentUid, _transactionType ) != StateStatus.OS_UNKNOWN )
                 {
                     doRecoverTransaction( currentUid ) ;
                 }
@@ -291,7 +292,7 @@
     private Vector _transactionUidVector = null ;
 
     // Reference to the Object Store.
-    private static ObjectStore _transactionStore = null ;
+    private static RecoveryStore _recoveryStore = null ;
 
     // This object manages the interface to all TransactionStatusManagers
     // processes(JVMs) on this system/node.

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	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/participant/at/ATParticipantRecoveryModule.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -20,7 +20,9 @@
  */
 package org.jboss.jbossts.xts.recovery.participant.at;
 
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
 import com.arjuna.ats.arjuna.objectstore.StateStatus;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import org.jboss.jbossts.xts.logging.XTSLogger;
 
 import com.arjuna.ats.arjuna.recovery.RecoveryModule;
@@ -28,7 +30,6 @@
 import com.arjuna.ats.arjuna.state.InputObjectState;
 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 java.util.Vector;
@@ -53,9 +54,9 @@
             XTSLogger.logger.debug("ATParticipantRecoveryModule created - default");
         }
 
-        if (_objectStore == null)
+        if (_recoveryStore == null)
         {
-            _objectStore = TxControl.getStore() ;
+            _recoveryStore = StoreManager.getRecoveryStore();
         }
 
         _participantType = ATParticipantRecoveryRecord.type();
@@ -67,7 +68,7 @@
      */
     public void install()
     {
-        XTSATRecoveryManager.setRecoveryManager(new XTSATRecoveryManagerImple(_objectStore));
+        XTSATRecoveryManager.setRecoveryManager(new XTSATRecoveryManagerImple(_recoveryStore));
         // Subordinate Coordinators register durable participants with their parent transaction so
         // we need to add an XTSATRecoveryModule which knows about the registered participants
 
@@ -107,7 +108,7 @@
                 XTSLogger.logger.debug("ATParticipantRecoveryModule: first pass");
             }
 
-            ATParticipants = _objectStore.allObjUids(_participantType, acc_uids );
+            ATParticipants = _recoveryStore.allObjUids(_participantType, acc_uids );
 
         }
         catch ( ObjectStoreException ex )
@@ -151,7 +152,7 @@
             // an application recovery module so we need to load it
             try {
                 // retrieve the data for the participant
-                InputObjectState inputState = _objectStore.read_committed(recoverUid, _participantType);
+                InputObjectState inputState = _recoveryStore.read_committed(recoverUid, _participantType);
 
                 if (inputState != null) {
                     try {
@@ -241,7 +242,7 @@
 
             try
             {
-                if ( _objectStore.currentState( currentUid, _participantType) != StateStatus.OS_UNKNOWN )
+                if ( _recoveryStore.currentState( currentUid, _participantType) != StateStatus.OS_UNKNOWN )
                 {
                     doRecoverParticipant( currentUid ) ;
                 }
@@ -266,7 +267,7 @@
     private Vector _participantUidVector = null ;
 
     // Reference to the Object Store.
-    private static ObjectStore _objectStore = null ;
+    private static RecoveryStore _recoveryStore = null ;
 
     // This object provides information about whether or not a participant is currently active.
 

Modified: labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/participant/at/XTSATRecoveryManagerImple.java
===================================================================
--- labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/participant/at/XTSATRecoveryManagerImple.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/participant/at/XTSATRecoveryManagerImple.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -1,9 +1,8 @@
 package org.jboss.jbossts.xts.recovery.participant.at;
 
+import com.arjuna.ats.arjuna.objectstore.TxLog;
 import org.jboss.jbossts.xts.logging.XTSLogger;
 
-import com.arjuna.wst.Durable2PCParticipant;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
 import com.arjuna.ats.arjuna.state.OutputObjectState;
 import com.arjuna.ats.arjuna.common.Uid;
 import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
@@ -19,11 +18,11 @@
 public class XTSATRecoveryManagerImple extends XTSATRecoveryManager {
     /**
      * constructor for use by ATParticipantRecoveryModule
-     * @param objectStore
+     * @param txLog
      */
-    XTSATRecoveryManagerImple(ObjectStore objectStore)
+    XTSATRecoveryManagerImple(TxLog txLog)
     {
-        this.objectStore = objectStore;
+        this.txLog = txLog;
     }
 
     /**
@@ -82,7 +81,7 @@
         if (participantRecoveryRecord.saveState(oos)) {
             Uid uid = new Uid();
             try {
-                objectStore.write_committed(uid, type, oos);
+                txLog.write_committed(uid, type, oos);
                 // we need to be able to identify the uid from the participant id
                 // in order to delete it later
                 uidMap.put(participantRecoveryRecord.getId(), uid);
@@ -106,7 +105,7 @@
         if (uid != null) {
 
             try {
-                objectStore.remove_committed(uid, type);
+                txLog.remove_committed(uid, type);
                 uidMap.remove(id);
                 return true;
             } catch (ObjectStoreException ose) {
@@ -374,7 +373,7 @@
     /**
      * the tx object store to be used for saving and deleting participant details
      */
-    private ObjectStore objectStore;
+    private TxLog txLog;
 
     private final static String type = ATParticipantRecoveryRecord.type();
 }

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	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/participant/ba/BAParticipantRecoveryModule.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -20,7 +20,9 @@
  */
 package org.jboss.jbossts.xts.recovery.participant.ba;
 
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
 import com.arjuna.ats.arjuna.objectstore.StateStatus;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import org.jboss.jbossts.xts.logging.XTSLogger;
 
 import com.arjuna.ats.arjuna.recovery.RecoveryModule;
@@ -28,7 +30,6 @@
 import com.arjuna.ats.arjuna.state.InputObjectState;
 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 java.util.Vector;
@@ -53,9 +54,9 @@
             XTSLogger.logger.debug("BAParticipantRecoveryModule created - default");
         }
 
-        if (_objectStore == null)
+        if (_recoveryStore == null)
         {
-            _objectStore = TxControl.getStore() ;
+            _recoveryStore = StoreManager.getRecoveryStore();
         }
 
         _participantType = BAParticipantRecoveryRecord.type();
@@ -67,7 +68,7 @@
      */
     public void install()
     {
-        XTSBARecoveryManager.setRecoveryManager(new XTSBARecoveryManagerImple(_objectStore));
+        XTSBARecoveryManager.setRecoveryManager(new XTSBARecoveryManagerImple(_recoveryStore));
         // Subordinate Coordinators register durable participants with their parent transaction so
         // we need to add an XTSBARecoveryModule which knows about the registered participants
 
@@ -107,7 +108,7 @@
                 XTSLogger.logger.debug("BAParticipantRecoveryModule: first pass");
             }
 
-            BAParticipants = _objectStore.allObjUids(_participantType, acc_uids );
+            BAParticipants = _recoveryStore.allObjUids(_participantType, acc_uids );
 
         }
         catch ( ObjectStoreException ex )
@@ -151,7 +152,7 @@
             // an application recovery module so we need to load it
             try {
                 // retrieve the data for the participant
-                InputObjectState inputState = _objectStore.read_committed(recoverUid, _participantType);
+                InputObjectState inputState = _recoveryStore.read_committed(recoverUid, _participantType);
 
                 if (inputState != null) {
                     try {
@@ -241,7 +242,7 @@
 
             try
             {
-                if ( _objectStore.currentState( currentUid, _participantType) != StateStatus.OS_UNKNOWN )
+                if ( _recoveryStore.currentState( currentUid, _participantType) != StateStatus.OS_UNKNOWN )
                 {
                     doRecoverParticipant( currentUid ) ;
                 }
@@ -266,7 +267,7 @@
     private Vector _participantUidVector = null ;
 
     // Reference to the Object Store.
-    private static ObjectStore _objectStore = null ;
+    private static RecoveryStore _recoveryStore = null ;
 
     // This object provides information about whether or not a participant is currently active.
 

Modified: labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/participant/ba/XTSBARecoveryManagerImple.java
===================================================================
--- labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/participant/ba/XTSBARecoveryManagerImple.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/XTS/recovery/src/org/jboss/jbossts/xts/recovery/participant/ba/XTSBARecoveryManagerImple.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -1,8 +1,8 @@
 package org.jboss.jbossts.xts.recovery.participant.ba;
 
+import com.arjuna.ats.arjuna.objectstore.TxLog;
 import org.jboss.jbossts.xts.logging.XTSLogger;
 
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
 import com.arjuna.ats.arjuna.state.OutputObjectState;
 import com.arjuna.ats.arjuna.common.Uid;
 import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
@@ -18,11 +18,11 @@
 public class XTSBARecoveryManagerImple extends XTSBARecoveryManager {
     /**
      * constructor for use by BAParticipantRecoveryModule
-     * @param objectStore
+     * @param txLog
      */
-    XTSBARecoveryManagerImple(ObjectStore objectStore)
+    XTSBARecoveryManagerImple(TxLog txLog)
     {
-        this.objectStore = objectStore;
+        this.txLog = txLog;
     }
 
     /**
@@ -77,7 +77,7 @@
         if (participantRecoveryRecord.saveState(oos)) {
             Uid uid = new Uid();
             try {
-                objectStore.write_committed(uid, type, oos);
+                txLog.write_committed(uid, type, oos);
                 // we need to be able to identify the uid from the participant id
                 // in order to delete it later
                 uidMap.put(participantRecoveryRecord.getId(), uid);
@@ -101,7 +101,7 @@
         if (uid != null) {
 
             try {
-                objectStore.remove_committed(uid, type);
+                txLog.remove_committed(uid, type);
                 uidMap.remove(id);
                 return true;
             } catch (ObjectStoreException ose) {
@@ -359,7 +359,7 @@
     /**
      * the tx object store to be used for saving and deleting participant details
      */
-    private ObjectStore objectStore;
+    private TxLog txLog;
 
     private final static String type = BAParticipantRecoveryRecord.type();
 }
\ No newline at end of file

Modified: labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/astests/taskdefs/TransactionLog.java
===================================================================
--- labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/astests/taskdefs/TransactionLog.java	2010-07-07 14:31:37 UTC (rev 33756)
+++ labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/astests/taskdefs/TransactionLog.java	2010-07-07 15:05:00 UTC (rev 33757)
@@ -21,12 +21,12 @@
 package org.jboss.jbossts.qa.astests.taskdefs;
 
 import com.arjuna.ats.arjuna.common.ObjectStoreEnvironmentBean;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
 import com.arjuna.ats.arjuna.common.Uid;
 import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
+import com.arjuna.ats.arjuna.objectstore.RecoveryStore;
+import com.arjuna.ats.arjuna.objectstore.StoreManager;
 import com.arjuna.ats.arjuna.state.InputObjectState;
 import com.arjuna.ats.arjuna.AtomicAction;
-import com.arjuna.ats.arjuna.coordinator.TxControl;
 import com.arjuna.ats.internal.arjuna.common.UidHelper;
 import com.arjuna.ats.arjuna.common.arjPropertyManager;
 
@@ -39,11 +39,11 @@
 public class TransactionLog
 {
     /**
-     * Default object type for store operations
+     * Default object type for recoveryStore operations
      */
     public static final String DEFAULT_OBJECT_TYPE = "StateManager/BasicAction/TwoPhaseCoordinator/AtomicAction";
 
-    private ObjectStore store;
+    private RecoveryStore recoveryStore;
 
     public TransactionLog(String storeDir, String impleType)
     {
@@ -61,7 +61,7 @@
             {
                 Class c = Class.forName(impleType);
                 
-                store = (ObjectStore) c.newInstance();
+                recoveryStore = (RecoveryStore) c.newInstance();
             }
             catch (final Throwable ex)
             {
@@ -69,21 +69,21 @@
             }
         }
         else
-            store = TxControl.getStore();
+            recoveryStore = StoreManager.getRecoveryStore();
     }
 
     /**
      * Remove any committed objects from the storer
      * @param objectType the type of objects that should be removed
      * @return the number of objects that were purged
-     * @throws ObjectStoreException the store implementation was unable to remove a committed object
+     * @throws ObjectStoreException the recoveryStore implementation was unable to remove a committed object
      */
     public int clearXids(String objectType) throws ObjectStoreException
     {
         Collection<Uid> uids = getIds(objectType);
 
         for (Uid uid : uids)
-            store.remove_committed(uid, objectType);
+            recoveryStore.remove_committed(uid, objectType);
 
         return uids.size();
     }
@@ -97,9 +97,9 @@
      * Get a list object ids for a given object type
      *
      * @param ids holder for the returned uids
-     * @param objectType The type of object to search in the store for
+     * @param objectType The type of object to search in the recoveryStore for
      * @return all objects of the given type
-     * @throws ObjectStoreException the store implementation was unable retrieve all types of objects
+     * @throws ObjectStoreException the recoveryStore implementation was unable retrieve all types of objects
      */
     public Collection<Uid> getIds(Collection<Uid> ids, String objectType) throws ObjectStoreException
     {
@@ -109,7 +109,7 @@
 
         InputObjectState types = new InputObjectState();
 
-        if (store.allTypes(types))
+        if (recoveryStore.allTypes(types))
         {
             String theName;
 
@@ -130,7 +130,7 @@
 
                         InputObjectState uids = new InputObjectState();
 
-                        if (store.allObjUids(theName, uids))
+                        if (recoveryStore.allObjUids(theName, uids))
                         {
                             Uid theUid = new Uid(Uid.nullUid());
 



More information about the jboss-svn-commits mailing list