[jboss-svn-commits] JBL Code SVN: r31140 - in labs/jbosstm/trunk: ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common and 18 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Jan 19 09:57:53 EST 2010
Author: mark.little at jboss.com
Date: 2010-01-19 09:57:51 -0500 (Tue, 19 Jan 2010)
New Revision: 31140
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/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/StateStatus.java
labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/StateType.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/common/ObjectStoreEnvironmentBean.java
labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/TxControl.java
labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/ObjectStore.java
labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/recovery/ActionStatusService.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/internal/arjuna/objectstore/ActionStore.java
labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/CacheStore.java
labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/FileSystemStore.java
labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/HashedActionStore.java
labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/HashedStore.java
labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/JDBCActionStore.java
labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/JDBCImple.java
labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/JDBCStore.java
labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/LogStore.java
labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/NullActionStore.java
labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/ShadowNoFileLockStore.java
labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/ShadowingStore.java
labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/VolatileStore.java
labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/oracle_driver.java
labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/AtomicActionRecoveryModule.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/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/RemoveCachedTest.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/panels/ObjectViewEntry.java
labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/internal/txoj/recovery/TORecoveryModule.java
labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/recovery/arjunacore/XARecoveryModule.java
labs/jbosstm/trunk/ArjunaJTA/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/rootprovider/InFlightTransactionPseudoStore.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/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/qa/TaskImpl.properties
Log:
https://jira.jboss.org/jira/browse/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-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/StateManager.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -33,6 +33,7 @@
import com.arjuna.ats.arjuna.coordinator.*;
import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.StateType;
import com.arjuna.ats.arjuna.common.*;
import com.arjuna.ats.arjuna.state.*;
import com.arjuna.ats.arjuna.utils.Utility;
@@ -1302,8 +1303,8 @@
if ((myType == ObjectType.ANDPERSISTENT)
|| (myType == ObjectType.NEITHER))
{
- int sharedStatus = ((objectModel == ObjectModel.SINGLE) ? ObjectStore.OS_UNSHARED
- : ObjectStore.OS_SHARED);
+ int sharedStatus = ((objectModel == ObjectModel.SINGLE) ? StateType.OS_UNSHARED
+ : StateType.OS_SHARED);
arjPropertyManager.getObjectStoreEnvironmentBean().setShare(
sharedStatus);
Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/ObjectStoreEnvironmentBean.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/ObjectStoreEnvironmentBean.java 2010-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/ObjectStoreEnvironmentBean.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -21,6 +21,7 @@
package com.arjuna.ats.arjuna.common;
import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.StateType;
import com.arjuna.ats.internal.arjuna.objectstore.HashedStore;
import com.arjuna.ats.internal.arjuna.objectstore.ShadowNoFileLockStore;
import com.arjuna.common.internal.util.propertyservice.FullPropertyName;
@@ -49,7 +50,7 @@
private volatile int jdbcPoolSizeMaximum = 1;
private volatile boolean jdbcPoolPutConnections = false;
- private volatile int share = ObjectStore.OS_UNSHARED;
+ private volatile int share = StateType.OS_UNSHARED;
private volatile int hierarchyRetry = 100;
private volatile int hierarchyTimeout = 100;
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-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/TxControl.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -35,6 +35,7 @@
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;
@@ -199,7 +200,7 @@
*/
if (sharedTransactionLog)
- arjPropertyManager.getObjectStoreEnvironmentBean().setShare(ObjectStore.OS_SHARED);
+ arjPropertyManager.getObjectStoreEnvironmentBean().setShare(StateType.OS_SHARED);
try
{
@@ -251,7 +252,7 @@
*/
if (sharedTransactionLog)
- arjPropertyManager.getObjectStoreEnvironmentBean().setShare(ObjectStore.OS_SHARED);
+ arjPropertyManager.getObjectStoreEnvironmentBean().setShare(StateType.OS_SHARED);
try
{
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/BaseStore.java (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/BaseStore.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -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-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/ObjectStore.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -35,7 +35,6 @@
import com.arjuna.ats.arjuna.state.*;
import java.io.File;
-import java.io.PrintWriter;
import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
import java.io.IOException;
@@ -60,197 +59,14 @@
* @message com.arjuna.ats.arjuna.objectstore.ObjectStore_1 [com.arjuna.ats.arjuna.objectstore.ObjectStore_1] - No implementation!
*/
-public abstract class ObjectStore
+public abstract class ObjectStore implements BaseStore, ParticipantStore, RecoveryStore, TxLog
{
-
- /**
- * StateStatus
- */
-
- public static final int OS_UNKNOWN = 0; // means no state present.
- public static final int OS_COMMITTED = 1;
- public static final int OS_UNCOMMITTED = 2;
- public static final int OS_HIDDEN = 4;
- public static final int OS_COMMITTED_HIDDEN = ObjectStore.OS_COMMITTED | ObjectStore.OS_HIDDEN;
- public static final int OS_UNCOMMITTED_HIDDEN = ObjectStore.OS_UNCOMMITTED | ObjectStore.OS_HIDDEN;
-
- /**
- * StateType.
- */
-
- public static final int OS_SHADOW = 10;
- public static final int OS_ORIGINAL = 11;
- public static final int OS_INVISIBLE = 12;
-
- public static final int OS_SHARED = 13;
- public static final int OS_UNSHARED = 14;
-
-
- /**
- * 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 ();
-
- /**
- * 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).
- *
- * @return <code>true</code> if no errors occurred, <code>false</code>
- * otherwise.
- */
-
- public abstract boolean allObjUids (String s, InputObjectState buff, int m) throws ObjectStoreException;
-
public boolean allObjUids (String s, InputObjectState buff) throws ObjectStoreException
{
- return allObjUids(s, buff, ObjectStore.OS_UNKNOWN);
+ 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 ...)
- */
-
- public abstract int currentState (Uid u, String tn) throws ObjectStoreException;
-
- /**
- * @return the "name" of the object store. Where in the hierarchy it appears, e.g., /ObjectStore/MyName/...
- */
-
- public abstract String getStoreName ();
-
- /**
- * 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;
-
- /**
- * 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;
-
- /**
- * 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 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;
-
- /**
- * 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 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;
-
- /**
- * 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;
-
- /**
* Some object store implementations may be running with automatic
* sync disabled. Calling this method will ensure that any states are
* flushed to disk.
@@ -380,7 +196,7 @@
protected ObjectStore ()
{
- this(OS_SHARED);
+ this(StateType.OS_SHARED);
}
protected ObjectStore (int ss)
@@ -405,52 +221,6 @@
return name;
}
- public static void printStateStatus (PrintWriter strm, int res)
- {
- strm.print(stateStatusString(res));
- }
-
- public static String stateStatusString (int res)
- {
- switch (res)
- {
- case ObjectStore.OS_UNKNOWN:
- return "ObjectStore.OS_UNKNOWN";
- case ObjectStore.OS_COMMITTED:
- return "ObjectStore.OS_COMMITTED";
- case ObjectStore.OS_UNCOMMITTED:
- return "ObjectStore.OS_UNCOMMITTED";
- case ObjectStore.OS_HIDDEN:
- return "ObjectStore.OS_HIDDEN";
- case ObjectStore.OS_COMMITTED_HIDDEN:
- return "ObjectStore.OS_COMMITTED_HIDDEN";
- case ObjectStore.OS_UNCOMMITTED_HIDDEN:
- return "ObjectStore.OS_UNCOMMITTED_HIDDEN";
- default:
- return "Unknown";
- }
- }
-
- public static void printStateType (PrintWriter strm, int res)
- {
- strm.print(stateTypeString(res));
- }
-
- public static String stateTypeString (int res)
- {
- switch (res)
- {
- case ObjectStore.OS_SHADOW:
- return "ObjectStore.OS_SHADOW";
- case ObjectStore.OS_ORIGINAL:
- return "ObjectStore.OS_ORIGINAL";
- case ObjectStore.OS_INVISIBLE:
- return "ObjectStore.OS_INVISIBLE";
- default:
- return "Unknown";
- }
- }
-
protected int shareStatus = arjPropertyManager.getObjectStoreEnvironmentBean().getShare(); // is the implementation sharing states between VMs?
private String _objectStoreRoot = arjPropertyManager.getObjectStoreEnvironmentBean().getLocalOSRoot();
Added: 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-01-19 14:57:51 UTC (rev 31140)
@@ -0,0 +1,98 @@
+/*
+ * 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;
+
+/**
+ * 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 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;
+}
+
Added: 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-01-19 14:57:51 UTC (rev 31140)
@@ -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/StateStatus.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/StateStatus.java (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/StateStatus.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -0,0 +1,88 @@
+/*
+ * 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 java.io.PrintWriter;
+
+/**
+ * The status of states in the ObjectStore.
+ *
+ * @author Mark Little (mark at arjuna.com)
+ * @version $Id: ObjectStore.java 2342 2006-03-30 13:06:17Z $
+ * @since JTS 1.0.
+ */
+
+public class StateStatus
+{
+ /**
+ * StateStatus
+ */
+
+ public static final int OS_UNKNOWN = -1; // means no state present.
+
+ public static final int OS_COMMITTED = 1;
+ public static final int OS_UNCOMMITTED = 2;
+ public static final int OS_HIDDEN = 4;
+ public static final int OS_COMMITTED_HIDDEN = StateStatus.OS_COMMITTED | StateStatus.OS_HIDDEN;
+ public static final int OS_UNCOMMITTED_HIDDEN = StateStatus.OS_UNCOMMITTED | StateStatus.OS_HIDDEN;
+
+ public static void printStateStatus (PrintWriter strm, int res)
+ {
+ strm.print(stateStatusString(res));
+ }
+
+ public static String stateStatusString (int res)
+ {
+ switch (res)
+ {
+ case StateStatus.OS_UNKNOWN:
+ return "StateStatus.OS_UNKNOWN";
+ case StateStatus.OS_COMMITTED:
+ return "StateStatus.OS_COMMITTED";
+ case StateStatus.OS_UNCOMMITTED:
+ return "StateStatus.OS_UNCOMMITTED";
+ case StateStatus.OS_HIDDEN:
+ return "StateStatus.OS_HIDDEN";
+ case StateStatus.OS_COMMITTED_HIDDEN:
+ return "StateStatus.OS_COMMITTED_HIDDEN";
+ case StateStatus.OS_UNCOMMITTED_HIDDEN:
+ return "StateStatus.OS_UNCOMMITTED_HIDDEN";
+ default:
+ return "Illegal";
+ }
+ }
+
+ private StateStatus ()
+ {
+ }
+}
+
Added: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/StateType.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/StateType.java (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/objectstore/StateType.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -0,0 +1,81 @@
+/*
+ * 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 java.io.PrintWriter;
+
+/**
+ * The type of the state in the ObjectStore.
+ *
+ * @author Mark Little (mark at arjuna.com)
+ * @version $Id: ObjectStore.java 2342 2006-03-30 13:06:17Z $
+ * @since JTS 1.0.
+ */
+
+public class StateType
+{
+ /**
+ * StateType.
+ */
+
+ public static final int OS_SHADOW = 10;
+ public static final int OS_ORIGINAL = 11;
+ public static final int OS_INVISIBLE = 12;
+
+ public static final int OS_SHARED = 13;
+ public static final int OS_UNSHARED = 14;
+
+ public static void printStateType (PrintWriter strm, int res)
+ {
+ strm.print(stateTypeString(res));
+ }
+
+ public static String stateTypeString (int res)
+ {
+ switch (res)
+ {
+ case StateType.OS_SHADOW:
+ return "StateType.OS_SHADOW";
+ case StateType.OS_ORIGINAL:
+ return "StateType.OS_ORIGINAL";
+ case StateType.OS_INVISIBLE:
+ return "StateType.OS_INVISIBLE";
+ default:
+ return "Illegal";
+ }
+ }
+
+ private StateType ()
+ {
+ }
+}
+
Added: 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-01-19 14:57:51 UTC (rev 31140)
@@ -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-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/recovery/ActionStatusService.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -40,6 +40,7 @@
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.StateStatus;
import com.arjuna.ats.arjuna.state.InputObjectState;
import com.arjuna.ats.arjuna.utils.Utility;
@@ -413,16 +414,16 @@
switch ( osState )
{
- case ObjectStore.OS_COMMITTED :
+ case StateStatus.OS_COMMITTED :
action_status = ActionStatus.COMMITTED;
break;
- case ObjectStore.OS_UNKNOWN:
+ case StateStatus.OS_UNKNOWN:
action_status = ActionStatus.ABORTED; // no state means aborted because of presumed abort rules
break;
- case ObjectStore.OS_UNCOMMITTED :
- case ObjectStore.OS_HIDDEN :
- case ObjectStore.OS_COMMITTED_HIDDEN :
- case ObjectStore.OS_UNCOMMITTED_HIDDEN :
+ case StateStatus.OS_UNCOMMITTED :
+ case StateStatus.OS_HIDDEN :
+ case StateStatus.OS_COMMITTED_HIDDEN :
+ case StateStatus.OS_UNCOMMITTED_HIDDEN :
action_status = ActionStatus.PREPARED;
break;
}
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-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/OTM.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -34,6 +34,7 @@
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;
@@ -802,19 +803,19 @@
{
switch (status)
{
- case ObjectStore.OS_COMMITTED:
- return "ObjectStore.OS_COMMITTED";
- case ObjectStore.OS_UNCOMMITTED:
- return "ObjectStore.OS_UNCOMMITTED";
- case ObjectStore.OS_HIDDEN:
- return "ObjectStore.OS_HIDDEN";
- case ObjectStore.OS_COMMITTED_HIDDEN:
- return "ObjectStore.OS_COMMITTED_HIDDEN";
- case ObjectStore.OS_UNCOMMITTED_HIDDEN:
- return "ObjectStore.OS_UNCOMMITTED_HIDDEN";
+ case StateStatus.OS_COMMITTED:
+ return "StateStatus.OS_COMMITTED";
+ case StateStatus.OS_UNCOMMITTED:
+ return "StateStatus.OS_UNCOMMITTED";
+ case StateStatus.OS_HIDDEN:
+ return "StateStatus.OS_HIDDEN";
+ case StateStatus.OS_COMMITTED_HIDDEN:
+ return "StateStatus.OS_COMMITTED_HIDDEN";
+ case StateStatus.OS_UNCOMMITTED_HIDDEN:
+ return "StateStatus.OS_UNCOMMITTED_HIDDEN";
default:
- case ObjectStore.OS_UNKNOWN:
- return "ObjectStore.OS_UNKNOWN";
+ case StateStatus.OS_UNKNOWN:
+ return "StateStatus.OS_UNKNOWN";
}
}
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-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/ObjectStateQuery.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -33,6 +33,7 @@
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;
@@ -87,7 +88,7 @@
InputObjectState buff = new InputObjectState();
- imple.allObjUids(type, buff, ObjectStore.OS_UNCOMMITTED);
+ imple.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-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/ObjectStoreMonitor.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -33,6 +33,7 @@
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;
@@ -128,7 +129,7 @@
{
System.out.print("\t" + theUid
+ " state is ");
- System.out.print(ObjectStore
+ System.out.print(StateStatus
.stateStatusString(imple
.currentState(
theUid,
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-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/TransactionMonitor.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -34,6 +34,7 @@
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.StateStatus;
import com.arjuna.ats.arjuna.state.*;
import com.arjuna.ats.internal.arjuna.common.UidHelper;
@@ -120,7 +121,7 @@
else
{
System.out.print("\t"+theUid+" state is ");
- System.out.print(ObjectStore.stateStatusString(imple.currentState(theUid, theName)));
+ System.out.print(StateStatus.stateStatusString(imple.currentState(theUid, theName)));
System.out.println();
}
}
Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/ActionStore.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/ActionStore.java 2010-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/ActionStore.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -33,6 +33,8 @@
import com.arjuna.ats.arjuna.objectstore.ObjectStore;
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.common.*;
import com.arjuna.ats.arjuna.state.*;
@@ -73,14 +75,14 @@
public int currentState (Uid objUid, String tName)
throws ObjectStoreException
{
- int theState = ObjectStore.OS_UNKNOWN;
+ int theState = StateStatus.OS_UNKNOWN;
if (storeValid())
{
- String path = genPathName(objUid, tName, ObjectStore.OS_ORIGINAL);
+ String path = genPathName(objUid, tName, StateType.OS_ORIGINAL);
if (exists(path))
- theState = ObjectStore.OS_COMMITTED;
+ theState = StateStatus.OS_COMMITTED;
path = null;
}
@@ -91,7 +93,7 @@
VisibilityLevel.VIS_PUBLIC, FacilityCode.FAC_OBJECT_STORE,
"com.arjuna.ats.internal.arjuna.objectstore.ActionStore_1",
new Object[]
- { objUid, tName, ObjectStore.stateStatusString(theState) });
+ { objUid, tName, StateStatus.stateStatusString(theState) });
}
return theState;
@@ -120,7 +122,7 @@
if (!storeValid())
return false;
- if (currentState(objUid, tName) == ObjectStore.OS_COMMITTED)
+ if (currentState(objUid, tName) == StateStatus.OS_COMMITTED)
result = true;
return result;
@@ -234,7 +236,7 @@
public ActionStore(String locationOfStore)
{
- this(locationOfStore, ObjectStore.OS_SHARED);
+ this(locationOfStore, StateType.OS_SHARED);
}
public ActionStore(String locationOfStore, int shareStatus)
@@ -259,7 +261,7 @@
public ActionStore()
{
- this(ObjectStore.OS_SHARED);
+ this(StateType.OS_SHARED);
}
public ActionStore(int shareStatus)
Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/CacheStore.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/CacheStore.java 2010-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/CacheStore.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -34,6 +34,8 @@
import com.arjuna.ats.arjuna.common.*;
import com.arjuna.ats.arjuna.objectstore.ObjectStore;
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.state.*;
import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
@@ -94,7 +96,7 @@
int fileState = currentState(objUid, name);
- if ((fileState != ObjectStore.OS_UNKNOWN)
+ if ((fileState != StateStatus.OS_UNKNOWN)
|| (status == AsyncStore.IN_USE))
{
return CacheStore._storeManager.addWork(this, AsyncStore.REMOVE,
@@ -102,7 +104,7 @@
}
else
{
- if (fileState == ObjectStore.OS_UNKNOWN)
+ if (fileState == StateStatus.OS_UNKNOWN)
return false;
else
return true;
@@ -166,7 +168,7 @@
public CacheStore(String locationOfStore)
{
- this(locationOfStore, ObjectStore.OS_SHARED);
+ this(locationOfStore, StateType.OS_SHARED);
}
public CacheStore(String locationOfStore, int shareStatus)
@@ -189,7 +191,7 @@
public CacheStore ()
{
- this(ObjectStore.OS_UNSHARED);
+ this(StateType.OS_UNSHARED);
}
public CacheStore (int shareStatus)
@@ -484,6 +486,14 @@
}
}
+ if (cacheIsFull())
+ {
+ synchronized (_workList)
+ {
+ _workList.notify();
+ }
+ }
+
/*
* Does the worker thread currently have it?
*/
@@ -539,9 +549,9 @@
}
else
{
- if (ft == ObjectStore.OS_ORIGINAL)
+ if (ft == StateType.OS_ORIGINAL)
{
- if (element.fileType == ObjectStore.OS_SHADOW)
+ if (element.fileType == StateType.OS_SHADOW)
{
synchronized (_workList)
{
@@ -561,7 +571,7 @@
break;
case AsyncStore.COMMIT:
- if (ft == ObjectStore.OS_ORIGINAL)
+ if (ft == StateType.OS_ORIGINAL)
{
synchronized (_workList)
{
@@ -583,6 +593,14 @@
}
}
+ if (cacheIsFull())
+ {
+ synchronized (_workList)
+ {
+ _workList.notify();
+ }
+ }
+
return status;
}
Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/FileSystemStore.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/FileSystemStore.java 2010-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/FileSystemStore.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -141,7 +141,7 @@
FacilityCode.FAC_OBJECT_STORE, "FileSystemStore.read_committed("+storeUid+", "+tName+")");
}
- return read_state(storeUid, tName, ObjectStore.OS_ORIGINAL);
+ return read_state(storeUid, tName, StateType.OS_ORIGINAL);
}
public InputObjectState read_uncommitted (Uid storeUid, String tName) throws ObjectStoreException
@@ -152,7 +152,7 @@
FacilityCode.FAC_OBJECT_STORE, "FileSystemStore.read_uncommitted("+storeUid+", "+tName+")");
}
- return read_state(storeUid, tName, ObjectStore.OS_SHADOW);
+ return read_state(storeUid, tName, StateType.OS_SHADOW);
}
public boolean remove_committed (Uid storeUid, String tName) throws ObjectStoreException
@@ -164,7 +164,7 @@
"FileSystemStore.remove_committed("+storeUid+", "+tName+")");
}
- return remove_state(storeUid, tName, ObjectStore.OS_ORIGINAL);
+ return remove_state(storeUid, tName, StateType.OS_ORIGINAL);
}
public boolean remove_uncommitted (Uid storeUid, String tName) throws ObjectStoreException
@@ -176,7 +176,7 @@
"FileSystemStore.remove_uncommitted("+storeUid+", "+tName+")");
}
- return remove_state(storeUid, tName, ObjectStore.OS_SHADOW);
+ return remove_state(storeUid, tName, StateType.OS_SHADOW);
}
public boolean write_committed (Uid storeUid, String tName, OutputObjectState state) throws ObjectStoreException
@@ -188,7 +188,7 @@
"FileSystemStore.write_committed("+storeUid+", "+tName+")");
}
- return write_state(storeUid, tName, state, ObjectStore.OS_ORIGINAL);
+ return write_state(storeUid, tName, state, StateType.OS_ORIGINAL);
}
public boolean write_uncommitted (Uid storeUid, String tName, OutputObjectState state) throws ObjectStoreException
@@ -200,7 +200,7 @@
"FileSystemStore.write_uncommitted("+storeUid+", "+tName+", "+state+")");
}
- return write_state(storeUid, tName, state, ObjectStore.OS_SHADOW);
+ return write_state(storeUid, tName, state, StateType.OS_SHADOW);
}
public final synchronized boolean storeValid ()
@@ -272,7 +272,7 @@
if ((aUid != null) && (aUid.valid()))
{
- if ((aUid.notEquals(Uid.nullUid())) && ((match == ObjectStore.OS_UNKNOWN) ||
+ if ((aUid.notEquals(Uid.nullUid())) && ((match == StateStatus.OS_UNKNOWN) ||
(isType(aUid, tName, match))))
{
UidHelper.packInto(aUid, store);
@@ -863,7 +863,7 @@
protected final boolean exists (String path)
{
- if (super.shareStatus == ObjectStore.OS_UNSHARED)
+ if (super.shareStatus == StateType.OS_UNSHARED)
{
if (FileSystemStore.fileCache.get(path) != null)
return true;
@@ -885,7 +885,7 @@
protected final void addToCache (String fname)
{
- if (super.shareStatus == ObjectStore.OS_UNSHARED)
+ if (super.shareStatus == StateType.OS_UNSHARED)
{
FileSystemStore.fileCache.put(fname, fname);
}
@@ -904,7 +904,7 @@
protected final void removeFromCache (String fname, boolean warn)
{
- if (super.shareStatus == ObjectStore.OS_UNSHARED)
+ if (super.shareStatus == StateType.OS_UNSHARED)
{
if ((FileSystemStore.fileCache.remove(fname) == null) && warn)
{
Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/HashedActionStore.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/HashedActionStore.java 2010-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/HashedActionStore.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -34,6 +34,7 @@
import com.arjuna.ats.arjuna.common.*;
import com.arjuna.ats.arjuna.objectstore.ObjectStore;
import com.arjuna.ats.arjuna.objectstore.ObjectStoreType;
+import com.arjuna.ats.arjuna.objectstore.StateType;
import com.arjuna.ats.arjuna.logging.tsLogger;
import com.arjuna.ats.arjuna.logging.FacilityCode;
@@ -71,7 +72,7 @@
public HashedActionStore()
{
- this(ObjectStore.OS_SHARED);
+ this(StateType.OS_SHARED);
}
public HashedActionStore(int shareStatus)
@@ -99,7 +100,7 @@
public HashedActionStore(String locationOfStore)
{
- this(locationOfStore, ObjectStore.OS_SHARED);
+ this(locationOfStore, StateType.OS_SHARED);
if (tsLogger.arjLogger.isDebugEnabled())
{
Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/HashedStore.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/HashedStore.java 2010-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/HashedStore.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -34,6 +34,8 @@
import com.arjuna.ats.arjuna.common.*;
import com.arjuna.ats.arjuna.objectstore.ObjectStore;
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.state.*;
import com.arjuna.ats.arjuna.logging.tsLogger;
@@ -146,7 +148,7 @@
aUid = new Uid(revealed);
}
- if ((aUid.notEquals(Uid.nullUid())) && ((match == ObjectStore.OS_UNKNOWN) ||
+ if ((aUid.notEquals(Uid.nullUid())) && ((match == StateStatus.OS_UNKNOWN) ||
(isType(aUid, tName, match))))
{
UidHelper.packInto(aUid, store);
@@ -196,7 +198,7 @@
public HashedStore ()
{
- this(ObjectStore.OS_SHARED);
+ this(StateType.OS_SHARED);
}
public HashedStore (int shareStatus)
@@ -223,7 +225,7 @@
public HashedStore (String locationOfStore)
{
- this(locationOfStore, ObjectStore.OS_SHARED);
+ this(locationOfStore, StateType.OS_SHARED);
}
public HashedStore (String locationOfStore, int shareStatus)
@@ -291,7 +293,7 @@
{
tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PROTECTED,
FacilityCode.FAC_OBJECT_STORE,
- "HashedStore.genPathName("+objUid+", "+tName+", "+ObjectStore.stateTypeString(otype)+")");
+ "HashedStore.genPathName("+objUid+", "+tName+", "+StateType.stateTypeString(otype)+")");
}
String storeName = locateStore(getStoreName());
@@ -338,7 +340,7 @@
fname = fname.substring(0, fname.length() -2);
// mark the shadow copy distinctly
- if (otype == ObjectStore.OS_SHADOW)
+ if (otype == StateType.OS_SHADOW)
fname = fname + SHADOWCHAR;
return fname;
Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/JDBCActionStore.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/JDBCActionStore.java 2010-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/JDBCActionStore.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -36,8 +36,8 @@
import com.arjuna.ats.arjuna.logging.tsLogger;
import com.arjuna.ats.arjuna.logging.FacilityCode;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
import com.arjuna.ats.arjuna.objectstore.ObjectStoreType;
+import com.arjuna.ats.arjuna.objectstore.StateStatus;
import com.arjuna.ats.arjuna.objectstore.jdbc.JDBCAccess;
import com.arjuna.ats.arjuna.common.*;
@@ -80,7 +80,7 @@
if (!storeValid())
return false;
- if (currentState(objUid, tName) == ObjectStore.OS_COMMITTED)
+ if (currentState(objUid, tName) == StateStatus.OS_COMMITTED)
result = true;
return result;
Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/JDBCImple.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/JDBCImple.java 2010-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/JDBCImple.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -34,6 +34,8 @@
import com.arjuna.ats.arjuna.state.*;
import com.arjuna.ats.arjuna.logging.tsLogger;
import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.StateStatus;
+import com.arjuna.ats.arjuna.objectstore.StateType;
import com.arjuna.ats.arjuna.common.*;
import com.arjuna.ats.arjuna.objectstore.jdbc.JDBCAccess;
@@ -85,7 +87,7 @@
.prepareStatement("DELETE FROM "
+ tableName
+ " WHERE UidString = ? AND TypeName = ? AND StateType = "
- + ObjectStore.OS_COMMITTED);
+ + StateStatus.OS_COMMITTED);
_preparedStatements[pool][PRECOMMIT_CLEANUP] = pstmt;
}
pstmt.setString(1, objUid.stringForm());
@@ -104,13 +106,13 @@
_preparedStatements[pool][COMMIT_STATE] = pstmt;
}
- if (currState == ObjectStore.OS_UNCOMMITTED)
+ if (currState == StateStatus.OS_UNCOMMITTED)
{
- pstmt.setInt(1, ObjectStore.OS_COMMITTED);
+ pstmt.setInt(1, StateStatus.OS_COMMITTED);
}
- else if (currState == ObjectStore.OS_UNCOMMITTED_HIDDEN)
+ else if (currState == StateStatus.OS_UNCOMMITTED_HIDDEN)
{
- pstmt.setInt(1, ObjectStore.OS_COMMITTED_HIDDEN);
+ pstmt.setInt(1, StateStatus.OS_COMMITTED_HIDDEN);
}
else
{
@@ -204,21 +206,21 @@
{
switch (state)
{
- case ObjectStore.OS_UNCOMMITTED_HIDDEN:
- case ObjectStore.OS_COMMITTED_HIDDEN:
+ case StateStatus.OS_UNCOMMITTED_HIDDEN:
+ case StateStatus.OS_COMMITTED_HIDDEN:
break;
- case ObjectStore.OS_UNCOMMITTED:
+ case StateStatus.OS_UNCOMMITTED:
{
- pstmt.setInt(1, ObjectStore.OS_UNCOMMITTED_HIDDEN);
+ pstmt.setInt(1, StateStatus.OS_UNCOMMITTED_HIDDEN);
pstmt.setString(2, objUid.stringForm());
pstmt.setString(3, typeName);
pstmt.setInt(4, state);
pstmt.executeUpdate();
}
break;
- case ObjectStore.OS_COMMITTED:
+ case StateStatus.OS_COMMITTED:
{
- pstmt.setInt(1, ObjectStore.OS_COMMITTED_HIDDEN);
+ pstmt.setInt(1, StateStatus.OS_COMMITTED_HIDDEN);
pstmt.setString(2, objUid.stringForm());
pstmt.setString(3, typeName);
pstmt.setInt(4, state);
@@ -303,26 +305,26 @@
{
switch (state)
{
- case ObjectStore.OS_UNCOMMITTED_HIDDEN:
+ case StateStatus.OS_UNCOMMITTED_HIDDEN:
{
- pstmt.setInt(1, ObjectStore.OS_UNCOMMITTED);
+ pstmt.setInt(1, StateStatus.OS_UNCOMMITTED);
pstmt.setString(2, objUid.stringForm());
pstmt.setString(3, typeName);
pstmt.setInt(4, state);
pstmt.executeUpdate();
}
break;
- case ObjectStore.OS_COMMITTED_HIDDEN:
+ case StateStatus.OS_COMMITTED_HIDDEN:
{
- pstmt.setInt(1, ObjectStore.OS_COMMITTED);
+ pstmt.setInt(1, StateStatus.OS_COMMITTED);
pstmt.setString(2, objUid.stringForm());
pstmt.setString(3, typeName);
pstmt.setInt(4, state);
pstmt.executeUpdate();
}
break;
- case ObjectStore.OS_COMMITTED:
- case ObjectStore.OS_UNCOMMITTED:
+ case StateStatus.OS_COMMITTED:
+ case StateStatus.OS_UNCOMMITTED:
break;
default:
revealedOk = false;
@@ -366,7 +368,7 @@
public int currentState(Uid objUid, String typeName, String tableName)
throws ObjectStoreException
{
- int theState = ObjectStore.OS_UNKNOWN;
+ int theState = StateStatus.OS_UNKNOWN;
ResultSet rs = null;
boolean cleanup = true;
@@ -408,16 +410,16 @@
switch (stateStatus)
{
- case ObjectStore.OS_UNCOMMITTED:
+ case StateStatus.OS_UNCOMMITTED:
have_OS_UNCOMMITTED = true;
break;
- case ObjectStore.OS_COMMITTED:
+ case StateStatus.OS_COMMITTED:
have_OS_COMMITTED = true;
break;
- case ObjectStore.OS_COMMITTED_HIDDEN:
+ case StateStatus.OS_COMMITTED_HIDDEN:
have_OS_COMMITTED_HIDDEN = true;
break;
- case ObjectStore.OS_UNCOMMITTED_HIDDEN:
+ case StateStatus.OS_UNCOMMITTED_HIDDEN:
have_OS_UNCOMMITTED_HIDDEN = true;
break;
}
@@ -426,19 +428,19 @@
// examine in reverse order:
if (have_OS_COMMITTED_HIDDEN)
{
- theState = ObjectStore.OS_COMMITTED_HIDDEN;
+ theState = StateStatus.OS_COMMITTED_HIDDEN;
}
if (have_OS_COMMITTED)
{
- theState = ObjectStore.OS_COMMITTED;
+ theState = StateStatus.OS_COMMITTED;
}
if (have_OS_UNCOMMITTED_HIDDEN)
{
- theState = ObjectStore.OS_UNCOMMITTED_HIDDEN;
+ theState = StateStatus.OS_UNCOMMITTED_HIDDEN;
}
if (have_OS_UNCOMMITTED)
{
- theState = ObjectStore.OS_UNCOMMITTED;
+ theState = StateStatus.OS_UNCOMMITTED;
}
}
catch (Throwable e)
@@ -465,7 +467,7 @@
new Object[]
{ e });
- return ObjectStore.OS_UNKNOWN;
+ return StateStatus.OS_UNKNOWN;
}
}
finally
@@ -765,8 +767,8 @@
if (name != null)
{
- if ((ft == ObjectStore.OS_COMMITTED)
- || (ft == ObjectStore.OS_UNCOMMITTED))
+ if ((ft == StateStatus.OS_COMMITTED)
+ || (ft == StateStatus.OS_UNCOMMITTED))
{
int pool = getPool();
@@ -860,7 +862,7 @@
if (tName != null)
{
- if ((ft == ObjectStore.OS_COMMITTED) || (ft == ObjectStore.OS_UNCOMMITTED))
+ if ((ft == StateStatus.OS_COMMITTED) || (ft == StateStatus.OS_UNCOMMITTED))
{
int pool = getPool();
ResultSet rs = null;
@@ -1215,12 +1217,12 @@
}
}
- return ObjectStore.OS_UNKNOWN;
+ return StateStatus.OS_UNKNOWN;
}
protected final void addToCache(Uid state, int status)
{
- if (shareStatus == ObjectStore.OS_UNSHARED)
+ if (shareStatus == StateType.OS_UNSHARED)
{
stateCache.put(state, new Integer(status));
}
@@ -1240,7 +1242,7 @@
*/
protected final void removeFromCache(String state, boolean warn)
{
- if (shareStatus == ObjectStore.OS_UNSHARED)
+ if (shareStatus == StateType.OS_UNSHARED)
{
if ((stateCache.remove(state) == null) && warn)
{
Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/JDBCStore.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/JDBCStore.java 2010-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/JDBCStore.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -40,6 +40,8 @@
import com.arjuna.ats.arjuna.objectstore.ObjectStore;
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.jdbc.JDBCAccess;
import com.arjuna.ats.arjuna.common.*;
@@ -159,7 +161,7 @@
if (storeValid())
return _theImple.currentState(objUid, tName, getTableName());
else
- return ObjectStore.OS_UNKNOWN;
+ return StateStatus.OS_UNKNOWN;
}
/**
@@ -179,7 +181,7 @@
+ tName + ")");
}
- return read_state(storeUid, tName, ObjectStore.OS_COMMITTED);
+ return read_state(storeUid, tName, StateStatus.OS_COMMITTED);
}
public InputObjectState read_uncommitted(Uid storeUid, String tName)
@@ -193,7 +195,7 @@
+ ")");
}
- return read_state(storeUid, tName, ObjectStore.OS_UNCOMMITTED);
+ return read_state(storeUid, tName, StateStatus.OS_UNCOMMITTED);
}
public boolean remove_committed(Uid storeUid, String tName)
@@ -207,7 +209,7 @@
+ ")");
}
- return remove_state(storeUid, tName, ObjectStore.OS_COMMITTED);
+ return remove_state(storeUid, tName, StateStatus.OS_COMMITTED);
}
public boolean remove_uncommitted(Uid storeUid, String tName)
@@ -221,7 +223,7 @@
+ ")");
}
- return remove_state(storeUid, tName, ObjectStore.OS_UNCOMMITTED);
+ return remove_state(storeUid, tName, StateStatus.OS_UNCOMMITTED);
}
public boolean write_committed(Uid storeUid, String tName,
@@ -235,7 +237,7 @@
+ ")");
}
- return write_state(storeUid, tName, state, ObjectStore.OS_COMMITTED);
+ return write_state(storeUid, tName, state, StateStatus.OS_COMMITTED);
}
public boolean write_uncommitted(Uid storeUid, String tName,
@@ -249,7 +251,7 @@
+ ", " + state + ")");
}
- return write_state(storeUid, tName, state, ObjectStore.OS_UNCOMMITTED);
+ return write_state(storeUid, tName, state, StateStatus.OS_UNCOMMITTED);
}
public final boolean storeValid()
@@ -329,7 +331,7 @@
VisibilityLevel.VIS_PROTECTED,
FacilityCode.FAC_OBJECT_STORE, "JDBCStore.remove_state("
+ objUid + ", " + name + ", "
- + ObjectStore.stateTypeString(ft) + ")");
+ + StateType.stateTypeString(ft) + ")");
}
if (!storeValid())
Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/LogStore.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/LogStore.java 2010-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/LogStore.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -28,6 +28,8 @@
import com.arjuna.ats.arjuna.common.arjPropertyManager;
import com.arjuna.ats.arjuna.objectstore.ObjectStore;
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.state.*;
import com.arjuna.ats.arjuna.utils.FileLock;
@@ -459,7 +461,7 @@
* recovery, it's not going to cause us problems anyway.
*/
- if (allObjUids(tName, ios, ObjectStore.OS_UNKNOWN))
+ if (allObjUids(tName, ios, StateStatus.OS_UNKNOWN))
{
Uid tempUid = new Uid(Uid.nullUid());
@@ -473,18 +475,18 @@
{
ex.printStackTrace();
- return ObjectStore.OS_UNKNOWN;
+ return StateStatus.OS_UNKNOWN;
}
if (tempUid.equals(objUid))
- return ObjectStore.OS_COMMITTED;
+ return StateStatus.OS_COMMITTED;
} while (tempUid.notEquals(Uid.nullUid()));
- return ObjectStore.OS_UNKNOWN;
+ return StateStatus.OS_UNKNOWN;
}
else
- return ObjectStore.OS_UNKNOWN;
+ return StateStatus.OS_UNKNOWN;
}
/**
@@ -688,7 +690,7 @@
public LogStore(String locationOfStore)
{
- this(locationOfStore, ObjectStore.OS_SHARED);
+ this(locationOfStore, StateType.OS_SHARED);
}
public LogStore(String locationOfStore, int shareStatus)
@@ -712,7 +714,7 @@
public LogStore()
{
- this(ObjectStore.OS_SHARED);
+ this(StateType.OS_SHARED);
}
public LogStore(int shareStatus)
@@ -810,7 +812,7 @@
VisibilityLevel.VIS_PROTECTED,
FacilityCode.FAC_OBJECT_STORE,
"ShadowingStore.write_state(" + objUid + ", " + tName
- + ", " + ObjectStore.stateTypeString(ft) + ")");
+ + ", " + StateType.stateTypeString(ft) + ")");
}
if (!storeValid())
@@ -1080,7 +1082,7 @@
{
String fname = super.genPathName(objUid, tName, ft);
- if (ft == ObjectStore.OS_UNCOMMITTED)
+ if (ft == StateStatus.OS_UNCOMMITTED)
fname = fname + HIDDENCHAR;
return fname;
@@ -1156,7 +1158,7 @@
synchronized (_lock)
{
- File fd = new File(genPathName(log.getName(), log.getTypeName(), ObjectStore.OS_COMMITTED));
+ File fd = new File(genPathName(log.getName(), log.getTypeName(), StateStatus.OS_COMMITTED));
try
{
@@ -1182,7 +1184,7 @@
* recovery purposes.
*/
- String fname = genPathName(log.getName(), log.getTypeName(), ObjectStore.OS_UNCOMMITTED);
+ String fname = genPathName(log.getName(), log.getTypeName(), StateStatus.OS_UNCOMMITTED);
File fd2 = openAndLock(fname, FileLock.F_WRLCK, true);
RandomAccessFile oFile = new RandomAccessFile(fd2, FILE_MODE);
int size = 0;
@@ -1288,7 +1290,7 @@
{
try
{
- String fname = genPathName(logName, typeName, ObjectStore.OS_COMMITTED);
+ String fname = genPathName(logName, typeName, StateStatus.OS_COMMITTED);
File fd = openAndLock(fname, FileLock.F_WRLCK, true);
RandomAccessFile iFile = new RandomAccessFile(fd, FILE_MODE);
// iFile.getChannel().lock();
Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/NullActionStore.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/NullActionStore.java 2010-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/NullActionStore.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -33,6 +33,8 @@
import com.arjuna.ats.arjuna.objectstore.ObjectStore;
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.common.*;
import com.arjuna.ats.arjuna.state.*;
@@ -67,7 +69,7 @@
public int currentState (Uid objUid, String tName)
throws ObjectStoreException
{
- return ObjectStore.OS_UNKNOWN;
+ return StateStatus.OS_UNKNOWN;
}
/**
@@ -130,7 +132,7 @@
public NullActionStore(String locationOfStore)
{
- this(locationOfStore, ObjectStore.OS_SHARED);
+ this(locationOfStore, StateType.OS_SHARED);
try
{
@@ -170,7 +172,7 @@
public NullActionStore()
{
- this(ObjectStore.OS_SHARED);
+ this(StateType.OS_SHARED);
}
public NullActionStore(int shareStatus)
Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/ShadowNoFileLockStore.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/ShadowNoFileLockStore.java 2010-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/ShadowNoFileLockStore.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -31,8 +31,8 @@
package com.arjuna.ats.internal.arjuna.objectstore;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
import com.arjuna.ats.arjuna.objectstore.ObjectStoreType;
+import com.arjuna.ats.arjuna.objectstore.StateType;
import com.arjuna.ats.arjuna.logging.tsLogger;
import com.arjuna.ats.arjuna.logging.FacilityCode;
@@ -62,7 +62,7 @@
public ShadowNoFileLockStore(String locationOfStore)
{
- this(locationOfStore, ObjectStore.OS_SHARED);
+ this(locationOfStore, StateType.OS_SHARED);
}
public ShadowNoFileLockStore(String locationOfStore, int shareStatus)
@@ -81,7 +81,7 @@
public ShadowNoFileLockStore()
{
- this(ObjectStore.OS_SHARED);
+ this(StateType.OS_SHARED);
}
public ShadowNoFileLockStore(int shareStatus)
Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/ShadowingStore.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/ShadowingStore.java 2010-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/ShadowingStore.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -33,6 +33,8 @@
import com.arjuna.ats.arjuna.objectstore.ObjectStore;
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.common.*;
import com.arjuna.ats.arjuna.state.*;
@@ -151,15 +153,15 @@
public int currentState (Uid objUid, String tName)
throws ObjectStoreException
{
- int theState = ObjectStore.OS_UNKNOWN;
+ int theState = StateStatus.OS_UNKNOWN;
if (storeValid())
{
- String path = genPathName(objUid, tName, ObjectStore.OS_SHADOW);
+ String path = genPathName(objUid, tName, StateType.OS_SHADOW);
if (exists(path))
{
- theState = ObjectStore.OS_UNCOMMITTED;
+ theState = StateStatus.OS_UNCOMMITTED;
}
else
{
@@ -167,15 +169,15 @@
if (exists(path))
{
- theState = ObjectStore.OS_UNCOMMITTED_HIDDEN;
+ theState = StateStatus.OS_UNCOMMITTED_HIDDEN;
}
else
{
- path = genPathName(objUid, tName, ObjectStore.OS_ORIGINAL);
+ path = genPathName(objUid, tName, StateType.OS_ORIGINAL);
if (exists(path))
{
- theState = ObjectStore.OS_COMMITTED;
+ theState = StateStatus.OS_COMMITTED;
}
else
{
@@ -183,7 +185,7 @@
if (exists(path))
{
- theState = ObjectStore.OS_COMMITTED_HIDDEN;
+ theState = StateStatus.OS_COMMITTED_HIDDEN;
}
}
}
@@ -200,7 +202,7 @@
"com.arjuna.ats.internal.arjuna.objectstore.ShadowingStore_22",
new Object[]
{ objUid, tName,
- ObjectStore.stateStatusString(theState) });
+ StateStatus.stateStatusString(theState) });
}
return theState;
@@ -240,13 +242,13 @@
String filename = null;
int state = currentState(objUid, tName);
- if ((state == ObjectStore.OS_UNCOMMITTED_HIDDEN)
- || (state == ObjectStore.OS_UNCOMMITTED))
+ if ((state == StateStatus.OS_UNCOMMITTED_HIDDEN)
+ || (state == StateStatus.OS_UNCOMMITTED))
{
- shadow = genPathName(objUid, tName, ObjectStore.OS_SHADOW);
- filename = genPathName(objUid, tName, ObjectStore.OS_ORIGINAL);
+ shadow = genPathName(objUid, tName, StateType.OS_SHADOW);
+ filename = genPathName(objUid, tName, StateType.OS_ORIGINAL);
- if (state == ObjectStore.OS_UNCOMMITTED_HIDDEN)
+ if (state == StateStatus.OS_UNCOMMITTED_HIDDEN)
{
/* maintain hidden status on rename */
@@ -324,12 +326,12 @@
switch (state)
{
- case ObjectStore.OS_UNCOMMITTED_HIDDEN:
- case ObjectStore.OS_COMMITTED_HIDDEN:
+ case StateStatus.OS_UNCOMMITTED_HIDDEN:
+ case StateStatus.OS_COMMITTED_HIDDEN:
break;
- case ObjectStore.OS_COMMITTED:
+ case StateStatus.OS_COMMITTED:
{
- path1 = genPathName(objUid, tName, ObjectStore.OS_ORIGINAL);
+ path1 = genPathName(objUid, tName, StateType.OS_ORIGINAL);
path2 = new String(path1) + HIDDINGCHAR;
File newState = new File(path1);
@@ -357,9 +359,9 @@
break;
}
- case ObjectStore.OS_UNCOMMITTED:
+ case StateStatus.OS_UNCOMMITTED:
{
- path1 = genPathName(objUid, tName, ObjectStore.OS_SHADOW);
+ path1 = genPathName(objUid, tName, StateType.OS_SHADOW);
path2 = new String(path1) + HIDDINGCHAR;
File newState = new File(path1);
@@ -416,9 +418,9 @@
switch (state)
{
- case ObjectStore.OS_UNCOMMITTED_HIDDEN:
+ case StateStatus.OS_UNCOMMITTED_HIDDEN:
{
- path1 = genPathName(objUid, tName, ObjectStore.OS_SHADOW);
+ path1 = genPathName(objUid, tName, StateType.OS_SHADOW);
path2 = new String(path1) + HIDDINGCHAR;
File newState = new File(path2);
@@ -446,9 +448,9 @@
break;
}
- case ObjectStore.OS_COMMITTED_HIDDEN:
+ case StateStatus.OS_COMMITTED_HIDDEN:
{
- path1 = genPathName(objUid, tName, ObjectStore.OS_ORIGINAL);
+ path1 = genPathName(objUid, tName, StateType.OS_ORIGINAL);
path2 = new String(path1) + HIDDINGCHAR;
File newState = new File(path2);
@@ -476,8 +478,8 @@
break;
}
- case ObjectStore.OS_COMMITTED:
- case ObjectStore.OS_UNCOMMITTED:
+ case StateStatus.OS_COMMITTED:
+ case StateStatus.OS_UNCOMMITTED:
break;
default:
revealedOk = false;
@@ -503,12 +505,12 @@
if (tsLogger.arjLogger.isDebugEnabled())
{
tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PROTECTED,
- FacilityCode.FAC_OBJECT_STORE, "ShadowingStore.genPathName("+objUid+", "+tName+", "+ObjectStore.stateTypeString(ft)+")");
+ FacilityCode.FAC_OBJECT_STORE, "ShadowingStore.genPathName("+objUid+", "+tName+", "+StateType.stateTypeString(ft)+")");
}
String fname = super.genPathName(objUid, tName, ft);
- if (ft == ObjectStore.OS_SHADOW)
+ if (ft == StateType.OS_SHADOW)
fname = fname + SHADOWCHAR;
return fname;
@@ -533,7 +535,7 @@
if (tsLogger.arjLogger.isDebugEnabled())
{
tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PROTECTED,
- FacilityCode.FAC_OBJECT_STORE, "ShadowingStore.read_state("+objUid+", "+tName+", "+ObjectStore.stateTypeString(ft)+")");
+ FacilityCode.FAC_OBJECT_STORE, "ShadowingStore.read_state("+objUid+", "+tName+", "+StateType.stateTypeString(ft)+")");
}
if (!storeValid())
@@ -551,15 +553,15 @@
{
int state = currentState(objUid, tName);
- if ((state == ObjectStore.OS_COMMITTED)
- || (state == ObjectStore.OS_UNCOMMITTED))
+ if ((state == StateStatus.OS_COMMITTED)
+ || (state == StateStatus.OS_UNCOMMITTED))
{
/*
* Is the current state the same as that requested?
*/
- if (((state == ObjectStore.OS_COMMITTED) && (ft != ObjectStore.OS_ORIGINAL))
- || ((state == ObjectStore.OS_UNCOMMITTED) && (ft != ObjectStore.OS_SHADOW)))
+ if (((state == StateStatus.OS_COMMITTED) && (ft != StateType.OS_ORIGINAL))
+ || ((state == StateStatus.OS_UNCOMMITTED) && (ft != StateType.OS_SHADOW)))
{
return null;
}
@@ -639,7 +641,7 @@
if (tsLogger.arjLogger.isDebugEnabled())
{
tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PROTECTED,
- FacilityCode.FAC_OBJECT_STORE, "ShadowingStore.remove_state("+objUid+", "+name+", "+ObjectStore.stateTypeString(ft)+")");
+ FacilityCode.FAC_OBJECT_STORE, "ShadowingStore.remove_state("+objUid+", "+name+", "+StateType.stateTypeString(ft)+")");
}
boolean removeOk = true;
@@ -651,8 +653,8 @@
{
int state = currentState(objUid, name);
- if ((state == ObjectStore.OS_COMMITTED)
- || (state == ObjectStore.OS_UNCOMMITTED))
+ if ((state == StateStatus.OS_COMMITTED)
+ || (state == StateStatus.OS_UNCOMMITTED))
{
String fname = genPathName(objUid, name, ft);
File fd = openAndLock(fname, FileLock.F_WRLCK, false);
@@ -663,7 +665,7 @@
{
removeOk = false;
- if (ft == ObjectStore.OS_ORIGINAL)
+ if (ft == StateType.OS_ORIGINAL)
{
if (tsLogger.arjLoggerI18N.isWarnEnabled())
{
@@ -693,7 +695,7 @@
{
removeOk = false;
- if (ft == ObjectStore.OS_ORIGINAL)
+ if (ft == StateType.OS_ORIGINAL)
{
if (tsLogger.arjLoggerI18N.isWarnEnabled())
{
@@ -730,7 +732,7 @@
{
removeOk = false;
- if (state == ObjectStore.OS_UNKNOWN)
+ if (state == StateStatus.OS_UNKNOWN)
tsLogger.arjLoggerI18N
.info(
"com.arjuna.ats.internal.arjuna.objectstore.ShadowingStore_14",
@@ -774,7 +776,7 @@
if (tsLogger.arjLogger.isDebugEnabled())
{
tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PROTECTED,
- FacilityCode.FAC_OBJECT_STORE, "ShadowingStore.write_state("+objUid+", "+tName+", "+ObjectStore.stateTypeString(ft)+")");
+ FacilityCode.FAC_OBJECT_STORE, "ShadowingStore.write_state("+objUid+", "+tName+", "+StateType.stateTypeString(ft)+")");
}
if (!storeValid())
@@ -877,7 +879,7 @@
public ShadowingStore(String locationOfStore)
{
- this(locationOfStore, ObjectStore.OS_SHARED);
+ this(locationOfStore, StateType.OS_SHARED);
}
public ShadowingStore(String locationOfStore, int shareStatus)
@@ -905,7 +907,7 @@
public ShadowingStore()
{
- this(ObjectStore.OS_SHARED);
+ this(StateType.OS_SHARED);
}
public ShadowingStore(int shareStatus)
Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/VolatileStore.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/VolatileStore.java 2010-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/VolatileStore.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -22,6 +22,7 @@
import com.arjuna.ats.arjuna.objectstore.ObjectStore;
import com.arjuna.ats.arjuna.objectstore.ObjectStoreType;
+import com.arjuna.ats.arjuna.objectstore.StateStatus;
import com.arjuna.ats.arjuna.state.InputObjectState;
import com.arjuna.ats.arjuna.state.OutputObjectState;
import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
@@ -172,7 +173,7 @@
"VolatileStore.read_committed(Uid="+u+", typeName="+tn+")");
}
- return read(u, tn, ObjectStore.OS_COMMITTED);
+ return read(u, tn, StateStatus.OS_COMMITTED);
}
/**
@@ -206,7 +207,7 @@
"VolatileStore.remove_committed(Uid="+u+", typeName="+tn+")");
}
- return remove(u, tn, ObjectStore.OS_COMMITTED);
+ return remove(u, tn, StateStatus.OS_COMMITTED);
}
/**
@@ -242,7 +243,7 @@
"VolatileStore.write_committed(Uid="+u+", typeName="+tn+")");
}
- return write(u, tn, buff, ObjectStore.OS_COMMITTED);
+ return write(u, tn, buff, StateStatus.OS_COMMITTED);
}
/**
@@ -317,9 +318,9 @@
private int getState(Uid u)
{
if(stateMap.containsKey(u)) {
- return ObjectStore.OS_COMMITTED;
+ return StateStatus.OS_COMMITTED;
} else {
- return ObjectStore.OS_UNKNOWN;
+ return StateStatus.OS_UNKNOWN;
}
}
}
Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/oracle_driver.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/oracle_driver.java 2010-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/oracle_driver.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -50,7 +50,7 @@
import com.arjuna.ats.arjuna.common.Uid;
import com.arjuna.ats.arjuna.state.InputObjectState;
import com.arjuna.ats.arjuna.state.OutputObjectState;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.StateStatus;
import com.arjuna.ats.internal.arjuna.objectstore.JDBCImple;
import com.arjuna.ats.arjuna.logging.tsLogger;
import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
@@ -73,7 +73,7 @@
if (tName != null)
{
- if ((ft == ObjectStore.OS_COMMITTED) || (ft == ObjectStore.OS_UNCOMMITTED))
+ if ((ft == StateStatus.OS_COMMITTED) || (ft == StateStatus.OS_UNCOMMITTED))
{
int pool = getPool();
ResultSet rs = null;
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-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/AtomicActionRecoveryModule.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -31,17 +31,15 @@
package com.arjuna.ats.internal.arjuna.recovery ;
-import java.io.* ;
-import java.net.* ;
import java.util.* ;
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.BasicAction ;
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.StateStatus;
import com.arjuna.ats.arjuna.recovery.RecoverAtomicAction ;
import com.arjuna.ats.arjuna.recovery.RecoveryModule ;
import com.arjuna.ats.arjuna.recovery.TransactionStatusConnectionManager ;
@@ -294,7 +292,7 @@
try
{
- if ( _transactionStore.currentState( currentUid, _transactionType ) != ObjectStore.OS_UNKNOWN )
+ if ( _transactionStore.currentState( currentUid, _transactionType ) != StateStatus.OS_UNKNOWN )
{
doRecoverTransaction( currentUid ) ;
}
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-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/AllObjUidsTest.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -32,6 +32,7 @@
package com.hp.mwtests.ts.arjuna.objectstore;
import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.StateStatus;
import com.arjuna.ats.arjuna.state.*;
import com.arjuna.ats.arjuna.common.Uid;
import com.arjuna.ats.arjuna.coordinator.TxControl;
@@ -52,17 +53,17 @@
String type = "/StateManager/BasicAction/TwoPhaseCoordinator/AtomicAction/DummyAtomicAction";
InputObjectState ios = new InputObjectState();
- objStore.allObjUids(type, ios, ObjectStore.OS_UNKNOWN);
+ objStore.allObjUids(type, ios, StateStatus.OS_UNKNOWN);
Uid uid = UidHelper.unpackFrom(ios);
assertEquals(Uid.nullUid(), uid);
ios = new InputObjectState();
- objStore.allObjUids(type, ios, ObjectStore.OS_COMMITTED);
+ objStore.allObjUids(type, ios, StateStatus.OS_COMMITTED);
uid = UidHelper.unpackFrom(ios);
assertEquals(Uid.nullUid(), uid);
ios = new InputObjectState();
- objStore.allObjUids(type, ios, ObjectStore.OS_UNCOMMITTED);
+ objStore.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/LogStoreRecoveryTest.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/LogStoreRecoveryTest.java 2010-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/LogStoreRecoveryTest.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -32,6 +32,7 @@
package com.hp.mwtests.ts.arjuna.objectstore;
import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.StateStatus;
import com.arjuna.ats.arjuna.state.*;
import com.arjuna.ats.arjuna.common.Uid;
import com.arjuna.ats.arjuna.common.arjPropertyManager;
@@ -118,7 +119,7 @@
boolean passed = true;
try {
- if (objStore.allObjUids(type, ios, ObjectStore.OS_UNKNOWN)) {
+ if (objStore.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-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/LogStoreTest.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -32,6 +32,7 @@
package com.hp.mwtests.ts.arjuna.objectstore;
import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.StateStatus;
import com.arjuna.ats.arjuna.state.*;
import com.arjuna.ats.arjuna.common.Uid;
import com.arjuna.ats.arjuna.common.arjPropertyManager;
@@ -73,7 +74,7 @@
boolean passed = false;
try {
- if (objStore.allObjUids(type, ios, ObjectStore.OS_UNKNOWN)) {
+ if (objStore.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-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/LogStoreTest2.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -32,6 +32,7 @@
package com.hp.mwtests.ts.arjuna.objectstore;
import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.StateStatus;
import com.arjuna.ats.arjuna.state.*;
import com.arjuna.ats.arjuna.common.Uid;
import com.arjuna.ats.arjuna.common.arjPropertyManager;
@@ -97,7 +98,7 @@
boolean passed = false;
try {
- if (objStore.allObjUids(type, ios, ObjectStore.OS_UNKNOWN)) {
+ if (objStore.allObjUids(type, ios, StateStatus.OS_UNKNOWN)) {
Uid id = new Uid(Uid.nullUid());
int numberOfEntries = 0;
@@ -131,10 +132,10 @@
while (id.notEquals(Uid.nullUid()));
if ((numberOfEntries == ids.length - 1) && passed) {
- if (objStore.currentState(ids[0], type) != ObjectStore.OS_UNKNOWN)
+ if (objStore.currentState(ids[0], type) != StateStatus.OS_UNKNOWN)
passed = false;
else {
- if (objStore.currentState(ids[1], type) != ObjectStore.OS_COMMITTED)
+ if (objStore.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-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/LogStressTest.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -37,6 +37,7 @@
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;
import com.arjuna.ats.internal.arjuna.objectstore.LogStore;
@@ -124,7 +125,7 @@
boolean passed = false;
try {
- TxControl.getStore().allObjUids(new MyAtomicAction().type(), ios, ObjectStore.OS_UNKNOWN);
+ TxControl.getStore().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-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/ObjectStoreTest.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -34,6 +34,7 @@
import com.arjuna.ats.arjuna.common.arjPropertyManager;
import com.arjuna.ats.arjuna.objectstore.ObjectStore;
import com.arjuna.ats.arjuna.objectstore.ObjectStoreType;
+import com.arjuna.ats.arjuna.objectstore.StateType;
import org.junit.Test;
import static org.junit.Assert.*;
@@ -52,7 +53,7 @@
arjPropertyManager.getCoordinatorEnvironmentBean().setTransactionLog(true);
arjPropertyManager.getObjectStoreEnvironmentBean().setLocalOSRoot(localOSRoot);
arjPropertyManager.getObjectStoreEnvironmentBean().setObjectStoreDir(objectStoreDir);
- arjPropertyManager.getObjectStoreEnvironmentBean().setShare(ObjectStore.OS_SHARED);
+ arjPropertyManager.getObjectStoreEnvironmentBean().setShare(StateType.OS_SHARED);
// check with a known valid implementation
@@ -82,7 +83,7 @@
if (objStore.getClass().getName().equals(imple))
{
- if (objStore.shareState() == ObjectStore.OS_SHARED) {
+ if (objStore.shareState() == StateType.OS_SHARED) {
if (objStore.storeDir().equals(objectStoreDir)) {
if (objStore.storeRoot().equals(localOSRoot))
passed = true;
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-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/RemoveCachedTest.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -33,6 +33,7 @@
import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
import com.arjuna.ats.arjuna.objectstore.ObjectStore;
+import com.arjuna.ats.arjuna.objectstore.StateStatus;
import com.arjuna.ats.arjuna.state.*;
import com.arjuna.ats.arjuna.common.*;
import com.arjuna.ats.internal.arjuna.common.UidHelper;
@@ -53,7 +54,7 @@
String type = "ArjunaMS/Destinations/a3d6227_dc656_3b77ce7e_2/Messages";
InputObjectState buff = new InputObjectState();
- if (store.allObjUids(type, buff, ObjectStore.OS_COMMITTED)) {
+ if (store.allObjUids(type, buff, StateStatus.OS_COMMITTED)) {
Uid toRemove = new Uid(Uid.nullUid());
do {
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-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/recovery/LogMoveTest.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -35,6 +35,7 @@
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.StateStatus;
import com.arjuna.ats.arjuna.state.OutputObjectState;
import com.arjuna.ats.internal.arjuna.common.UidHelper;
import com.arjuna.ats.internal.arjuna.recovery.ExpiredTransactionScanner;
@@ -60,7 +61,7 @@
os.write_committed(kungfuTx, tn, fluff);
- if (os.currentState(kungfuTx, tn) == ObjectStore.OS_COMMITTED) {
+ if (os.currentState(kungfuTx, tn) == StateStatus.OS_COMMITTED) {
System.err.println("Wrote dummy transaction " + kungfuTx);
// quicker to deal with scanner directly
@@ -71,7 +72,7 @@
scanner.scan();
- if (os.currentState(kungfuTx, tn) == ObjectStore.OS_COMMITTED)
+ if (os.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-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/recovery/RecoverAtomicActionTest.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -36,6 +36,7 @@
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.StateStatus;
import com.arjuna.ats.arjuna.recovery.RecoverAtomicAction;
import com.arjuna.ats.arjuna.state.OutputObjectState;
import com.arjuna.ats.internal.arjuna.common.UidHelper;
@@ -62,7 +63,7 @@
os.write_committed(kungfuTx, tn, fluff);
- if (os.currentState(kungfuTx, tn) == ObjectStore.OS_COMMITTED)
+ if (os.currentState(kungfuTx, tn) == StateStatus.OS_COMMITTED)
{
System.err.println("Wrote dummy transaction " + kungfuTx);
@@ -76,7 +77,7 @@
// state should have been moved
- if (os.currentState(kungfuTx, tn) == ObjectStore.OS_UNKNOWN)
+ if (os.currentState(kungfuTx, tn) == StateStatus.OS_UNKNOWN)
passed = true;
}
}
Modified: labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/panels/ObjectViewEntry.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/panels/ObjectViewEntry.java 2010-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/panels/ObjectViewEntry.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -35,8 +35,13 @@
public class ObjectViewEntry extends IconPanelEntry
{
- private final static String OBJECT_VIEW_ICON_FILENAME = "object-icon.gif";
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+ private final static String OBJECT_VIEW_ICON_FILENAME = "object-icon.gif";
+
private String _tn;
private ObjectStoreBrowserNode _node;
@@ -48,7 +53,7 @@
_node = node;
/** Set tooltip to the state of the underlying object **/
- this.setToolTipText(com.arjuna.ats.arjuna.objectstore.ObjectStore.stateStatusString(state));
+ this.setToolTipText(com.arjuna.ats.arjuna.objectstore.StateStatus.stateStatusString(state));
}
public String getUID()
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-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/internal/txoj/recovery/TORecoveryModule.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -161,7 +161,7 @@
// find the uids of anything with an uncommitted
// entry in the object store
if (_objectStore.allObjUids(theName, uids,
- ObjectStore.OS_UNCOMMITTED))
+ StateStatus.OS_UNCOMMITTED))
{
Uid theUid = null;
@@ -254,7 +254,7 @@
try
{
- if (_objectStore.currentState(objUid, objType) == ObjectStore.OS_UNCOMMITTED)
+ if (_objectStore.currentState(objUid, objType) == StateStatus.OS_UNCOMMITTED)
{
recoverObject(objUid, objType);
}
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-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/recovery/arjunacore/XARecoveryModule.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -34,6 +34,7 @@
import com.arjuna.ats.arjuna.common.*;
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;
import com.arjuna.ats.arjuna.logging.FacilityCode;
@@ -417,7 +418,7 @@
*/
if (_objStore.currentState(theUid, _recoveryManagerClass
- .type()) != ObjectStore.OS_UNKNOWN)
+ .type()) != StateStatus.OS_UNKNOWN)
{
boolean problem = false;
XARecoveryResource record = null;
@@ -1201,7 +1202,7 @@
{
try
{
- if (_transactionStore.currentState(u, _transactionType) != ObjectStore.OS_UNKNOWN)
+ if (_transactionStore.currentState(u, _transactionType) != StateStatus.OS_UNKNOWN)
{
return true;
}
Modified: labs/jbosstm/trunk/ArjunaJTA/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/rootprovider/InFlightTransactionPseudoStore.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/rootprovider/InFlightTransactionPseudoStore.java 2010-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaJTA/tsmx/bin/com/arjuna/ats/tools/objectstorebrowser/rootprovider/InFlightTransactionPseudoStore.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -22,20 +22,20 @@
import com.arjuna.ats.arjuna.objectstore.ObjectStoreType;
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.arjuna.state.OutputObjectState;
import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
import com.arjuna.ats.arjuna.common.Uid;
import com.arjuna.ats.arjuna.logging.tsLogger;
import com.arjuna.ats.internal.arjuna.common.UidHelper;
-import com.arjuna.ats.internal.arjuna.common.UidHelper;
import com.arjuna.ats.tools.objectstorebrowser.TransactionLister;
import java.util.Set;
import java.io.IOException;
/**
- * ObjectStore facade for objtaining a list of live transactions. The facade is required
+ * ObjectStore facade for obtaining a list of live transactions. The facade is required
* since the browser frame
* @see com.arjuna.ats.tools.objectstorebrowser.frames.BrowserFrame
* will only display object store entries.
@@ -120,7 +120,7 @@
public int currentState(Uid u, String tn) throws ObjectStoreException
{
- return ObjectStore.OS_UNCOMMITTED;
+ return StateStatus.OS_UNCOMMITTED;
}
public String getStoreName()
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-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/interposition/ServerFactory.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -40,6 +40,7 @@
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;
import org.omg.CosTransactions.*;
@@ -204,15 +205,15 @@
switch (status)
{
- case ObjectStore.OS_UNKNOWN: // means no state present
+ case StateStatus.OS_UNKNOWN: // means no state present
return org.omg.CosTransactions.Status.StatusNoTransaction;
- case ObjectStore.OS_COMMITTED:
+ case StateStatus.OS_COMMITTED:
return org.omg.CosTransactions.Status.StatusCommitted;
- case ObjectStore.OS_UNCOMMITTED:
+ case StateStatus.OS_UNCOMMITTED:
return org.omg.CosTransactions.Status.StatusPrepared;
- case ObjectStore.OS_HIDDEN:
- case ObjectStore.OS_COMMITTED_HIDDEN:
- case ObjectStore.OS_UNCOMMITTED_HIDDEN:
+ case StateStatus.OS_HIDDEN:
+ case StateStatus.OS_COMMITTED_HIDDEN:
+ case StateStatus.OS_UNCOMMITTED_HIDDEN:
return org.omg.CosTransactions.Status.StatusPrepared;
default:
return org.omg.CosTransactions.Status.StatusUnknown;
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-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/orbspecific/TransactionFactoryImple.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -47,6 +47,7 @@
import com.arjuna.common.util.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;
import com.arjuna.ats.arjuna.coordinator.TransactionReaper;
@@ -606,16 +607,16 @@
switch (status)
{
- case ObjectStore.OS_UNKNOWN: // means no state present, so check
+ case StateStatus.OS_UNKNOWN: // means no state present, so check
// if server transaction
return ServerFactory.getOSStatus(u);
- case ObjectStore.OS_COMMITTED:
+ case StateStatus.OS_COMMITTED:
return org.omg.CosTransactions.Status.StatusCommitted;
- case ObjectStore.OS_UNCOMMITTED:
+ case StateStatus.OS_UNCOMMITTED:
return org.omg.CosTransactions.Status.StatusPrepared;
- case ObjectStore.OS_HIDDEN:
- case ObjectStore.OS_COMMITTED_HIDDEN:
- case ObjectStore.OS_UNCOMMITTED_HIDDEN:
+ case StateStatus.OS_HIDDEN:
+ case StateStatus.OS_COMMITTED_HIDDEN:
+ case StateStatus.OS_UNCOMMITTED_HIDDEN:
return org.omg.CosTransactions.Status.StatusPrepared;
default:
return ServerFactory.getStatus(u);
@@ -843,7 +844,7 @@
InputObjectState uids = new InputObjectState();
- if (!TxStoreLog.getTransactions(uids, ObjectStore.OS_COMMITTED_HIDDEN))
+ if (!TxStoreLog.getTransactions(uids, StateStatus.OS_COMMITTED_HIDDEN))
{
throw new NoTransaction();
}
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-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/RecoveredServerTransaction.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -195,7 +195,7 @@
try
{
- if ((store().currentState(getSavingUid(), effectiveTypeName) != ObjectStore.OS_UNKNOWN))
+ if ((store().currentState(getSavingUid(), effectiveTypeName) != StateStatus.OS_UNKNOWN))
{
/*
* By activating the state we get the actual transaction id and
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-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/RecoveredTransaction.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -140,7 +140,7 @@
try
{
- if ((store().currentState(actionUid, effectiveTypeName) != ObjectStore.OS_UNKNOWN))
+ if ((store().currentState(actionUid, effectiveTypeName) != StateStatus.OS_UNKNOWN))
{
if (activate())
_recoveryStatus = RecoveryStatus.ACTIVATED;
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-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/ServerTransactionRecoveryModule.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -115,7 +115,7 @@
try
{
// Is the intentions list still there? Is this the best way to check?
- if (_transactionStore.currentState(currentUid, _transactionType) != ObjectStore.OS_UNKNOWN)
+ if (_transactionStore.currentState(currentUid, _transactionType) != StateStatus.OS_UNKNOWN)
{
if (jtsLogger.loggerI18N.isInfoEnabled())
{
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-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/transactions/TransactionRecoveryModule.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -187,7 +187,7 @@
try
{
// Is the intentions list still there? Is this the best way to check?
- if (_transactionStore.currentState(currentUid, _transactionType) != ObjectStore.OS_UNKNOWN)
+ if (_transactionStore.currentState(currentUid, _transactionType) != StateStatus.OS_UNKNOWN)
{
if (jtsLogger.loggerI18N.isInfoEnabled())
{
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-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/utils/TxStoreLog.java 2010-01-19 14:57:51 UTC (rev 31140)
@@ -35,6 +35,7 @@
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;
@@ -47,7 +48,7 @@
public static boolean getTransactions (InputObjectState os)
{
- return getTransactions(os, ObjectStore.OS_UNKNOWN);
+ return getTransactions(os, StateStatus.OS_UNKNOWN);
}
public static boolean getTransactions (InputObjectState os, int status)
Modified: labs/jbosstm/trunk/qa/TaskImpl.properties
===================================================================
--- labs/jbosstm/trunk/qa/TaskImpl.properties 2010-01-19 14:52:48 UTC (rev 31139)
+++ labs/jbosstm/trunk/qa/TaskImpl.properties 2010-01-19 14:57:51 UTC (rev 31140)
@@ -15,7 +15,7 @@
# Location of the JVM to use. Should usually be jdk6. Tweak according to your machine.
# Note: the version in svn should have the right value for the hudson server - don't check in you own!
#
-COMMAND_LINE_0=/qa/tools/opt/jdk1.6.0_11/bin/java
+COMMAND_LINE_0=/usr/local/soylatte16-i386-1.0.3/bin/java
# use this form to inherit the java version used by ant:
#COMMAND_LINE_0=${java.home}${file.separator}bin${file.separator}java
#COMMAND_LINE_0=/usr/local/jdk1.6.0_16/bin/java
More information about the jboss-svn-commits
mailing list