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

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu May 7 05:51:31 EDT 2009


Author: jhalliday
Date: 2009-05-07 05:51:30 -0400 (Thu, 07 May 2009)
New Revision: 26416

Modified:
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/StateManager.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/Uid.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/arjPropertyManager.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/ActionHierarchy.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/exceptions/FatalError.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/exceptions/ObjectStoreError.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/exceptions/ObjectStoreException.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/recovery/TransactionStatusManager.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/gandiva/nameservice/JNS.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/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/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/ShadowingStore.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/accessors/accessor.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/apache_driver.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/oracle_8_0_driver.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/objectstore/jdbc/sqlserver_driver.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/thread/ThreadSpecificData.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/utils/ExecProcessId.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/utils/MBeanProcessId.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/utils/ManualProcessId.java
   labs/jbosstm/trunk/ArjunaCore/tsmx/classes/com/arjuna/ats/internal/tsmx/agent/exceptions/NotSupportedException.java
   labs/jbosstm/trunk/ArjunaCore/tsmx/classes/com/arjuna/ats/internal/tsmx/mbeans/MappingsNotFoundException.java
   labs/jbosstm/trunk/ArjunaCore/tsmx/classes/com/arjuna/ats/internal/tsmx/mbeans/PropertyServiceJMXPlugin.java
   labs/jbosstm/trunk/ArjunaCore/tsmx/classes/com/arjuna/ats/internal/tsmx/mbeans/PropertyServiceMBeanWrapper.java
   labs/jbosstm/trunk/ArjunaCore/tsmx/classes/com/arjuna/ats/tsmx/agent/exceptions/AgentNotFoundException.java
   labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/internal/txoj/lockstore/BasicPersistentLockStore.java
   labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/txoj/LockMode.java
   labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/txoj/exceptions/LockStoreException.java
   labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/TransactionImple.java
   labs/jbosstm/trunk/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts/TransactionImple.java
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/OTSImpleManager.java
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/context/ContextManager.java
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/RecoveryInit.java
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/hporb/interceptors/context/ContextORBInitializerImpl.java
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/hporb/interceptors/interposition/InterpositionORBInitializerImpl.java
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/jacorb/interceptors/context/ContextORBInitializerImpl.java
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/jacorb/interceptors/interposition/InterpositionORBInitializerImpl.java
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/javaidl/interceptors/context/ContextORBInitializerImpl.java
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/javaidl/interceptors/interposition/InterpositionORBInitializerImpl.java
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/orbix2000/interceptors/context/ContextORBInitializerImpl.java
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/orbix2000/interceptors/interposition/InterpositionORBInitializerImpl.java
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/thread/OTSThread.java
Log:
Exception handling cleanup for ArjunaCore. JBTM-544


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	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/StateManager.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -61,7 +61,7 @@
  *
  * @message com.arjuna.ats.arjuna.StateManager_1 [com.arjuna.ats.arjuna.StateManager_1] - StateManager::terminate() should be invoked in every destructor
  * @message com.arjuna.ats.arjuna.StateManager_2 [com.arjuna.ats.arjuna.StateManager_2] - Activate of object with id = {0} and type {1} unexpectedly failed"
- * @message com.arjuna.ats.arjuna.StateManager_3 [com.arjuna.ats.arjuna.StateManager_3] - StateManager::deactivate - object store error 
+ * @message com.arjuna.ats.arjuna.StateManager_3 [com.arjuna.ats.arjuna.StateManager_3] - StateManager::deactivate - object store error
  * @message com.arjuna.ats.arjuna.StateManager_4 [com.arjuna.ats.arjuna.StateManager_4] - StateManager::deactivate - save_state error
  * @message com.arjuna.ats.arjuna.StateManager_5 [com.arjuna.ats.arjuna.StateManager_5] - StateManager::destroy for object-id {0}
  * @message com.arjuna.ats.arjuna.StateManager_6 [com.arjuna.ats.arjuna.StateManager_6] - StateManager.destroy - failed to add abstract record.
@@ -134,7 +134,7 @@
 	    {
 		Uid txId = new Uid(Uid.nullUid());
 		Uid processUid = new Uid(Uid.nullUid());
-		
+
 		unpackHeader(os, txId, processUid);
 	    }
 	    catch (IOException e)
@@ -145,7 +145,7 @@
 
 	return true;
     }
-    
+
     /**
      * Destructor.
      */
@@ -161,7 +161,7 @@
 	if (currentStatus == ObjectStatus.ACTIVE_NEW)
 	{
 	    BasicAction action = BasicAction.Current();
- 
+
 	    if ((action != null) && (action.status() == ActionStatus.RUNNING))
 	    {
 		if (tsLogger.arjLoggerI18N.isWarnEnabled())
@@ -215,15 +215,15 @@
      * @return <code>true</code> on success, <code>false</code> otherwise.
      * @see com.arjuna.ats.arjuna.objectstore.ObjectStore
      */
-    
+
 public synchronized boolean activate (String rootName)
     {
 	if (tsLogger.arjLogger.debugAllowed())
 	{
-	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, FacilityCode.FAC_STATE_MAN, 
+	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, FacilityCode.FAC_STATE_MAN,
 				     "StateManager::activate( "+((rootName != null) ? rootName : "null")+") for object-id "+objectUid);
 	}
-	
+
 	if (myType == ObjectType.NEITHER)
 	{
 	    return true;
@@ -285,7 +285,7 @@
 	    }
 
 	    /* Only really activate if object is PASSIVE */
-	    
+
 	    if (currentStatus == ObjectStatus.PASSIVE)
 	    {
 		/*
@@ -298,7 +298,7 @@
 		if (loadObjectState())
 		{
 		    InputObjectState oldState = null;
-		
+
 		    try
 		    {
 			oldState = objectStore.read_committed(objectUid, type());
@@ -348,7 +348,7 @@
 	     * Create ActivationRecord if status changed Passive->Active or if
 	     * object is a new persistent object.
 	     */
-	
+
 	    if (forceAR || ((currentStatus == ObjectStatus.ACTIVE) ||
 			    (currentStatus == ObjectStatus.PASSIVE_NEW)) && (action != null))
 	    {
@@ -366,7 +366,7 @@
 			    usingActions.remove(action.topLevelAction().get_uid());
 			}
 		    }
-		    
+
 		    if (arStatus == AddOutcome.AR_REJECTED)
 			result = false;
 		}
@@ -376,15 +376,15 @@
 		     * We never reset activated, so we can optimise state
 		     * loading/unloading in the case of SINGLE object model
 		     */
-		    
+
 		    currentlyActivated = activated = true;
 		}
 	    }
 	}
-	
+
 	return result;
     }
-    
+
     /**
      * This operation deactivates a persistent object.
      * It behaves in a similar manner to the activate operation, but has an
@@ -431,10 +431,10 @@
     {
 	if (tsLogger.arjLogger.debugAllowed())
 	{
-	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, FacilityCode.FAC_STATE_MAN, 
+	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, FacilityCode.FAC_STATE_MAN,
 				     "StateManager::deactivate("+((rootName != null) ? rootName : "null")+", "+commit+") for object-id " +objectUid);
 	}
-	
+
 	boolean result = false;
 
 	if ((currentlyActivated  && (myType == ObjectType.ANDPERSISTENT)) || loadObjectState())
@@ -464,7 +464,7 @@
 		    {
 			if (tsLogger.arjLoggerI18N.isWarnEnabled())
 			    tsLogger.arjLoggerI18N.warn("com.arjuna.ats.arjuna.StateManager_3",e);
-			
+
 			result = false;
 		    }
 		}
@@ -473,7 +473,7 @@
 		    if (tsLogger.arjLoggerI18N.isWarnEnabled())
 			tsLogger.arjLoggerI18N.warn("com.arjuna.ats.arjuna.StateManager_4");
 		}
-		
+
 		/*
 		 * Not needed any more because activation record does this when
 		 * all actions are forgotten.
@@ -488,7 +488,7 @@
 	{
 	    result = true;
 	}
-	
+
 	return result;
     }
 
@@ -518,7 +518,7 @@
     {
 	return objectUid;
     }
-    
+
     /**
      * Destroy the object (e.g., remove its state from the persistent
      * store.)
@@ -528,22 +528,22 @@
      *
      * @return <code>true</code> on success, <code>false</code> otherwise.
      */
-    
+
 public synchronized boolean destroy ()
     {
 	if (tsLogger.arjLoggerI18N.debugAllowed())
 	{
 	    tsLogger.arjLoggerI18N.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
-					 FacilityCode.FAC_STATE_MAN, 
+					 FacilityCode.FAC_STATE_MAN,
 					 "com.arjuna.ats.arjuna.StateManager_5", new Object[]{objectUid});
 	}
 
 	boolean result = false;
-    
+
 	if (objectStore != null)
 	{
 	    BasicAction action = BasicAction.Current();
-	
+
 	    if (action != null)  // add will fail if the status is wrong!
 	    {
 		DisposeRecord dr = new DisposeRecord(objectStore, this);
@@ -587,13 +587,13 @@
 	    /*
 	     * Not a persistent object!
 	     */
-	    
+
 	    if (tsLogger.arjLoggerI18N.isWarnEnabled())
 	    {
 		tsLogger.arjLoggerI18N.warn("com.arjuna.ats.arjuna.StateManager_8");
 	    }
 	}
-	
+
 	return result;
     }
 
@@ -643,7 +643,7 @@
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
 				     FacilityCode.FAC_STATE_MAN, "StateManager::getStoreRoot ()");
 	}
-	
+
 	return storeRoot;
     }
 
@@ -694,7 +694,7 @@
 	    // pack the marker first.
 
 	    os.packString(StateManager.marker);
-		
+
 	    /*
 	     * Only pack something if there is a transaction. Otherwise
 	     * the application is driving this object manually, and all
@@ -715,7 +715,7 @@
 	}
 	catch (Exception e)
 	{
-	    throw new IOException(e.toString());
+	    throw new IOException(e.toString(), e);
 	}
     }
 
@@ -735,7 +735,7 @@
 	try
 	{
 	    String myState = os.unpackString();
-		
+
 	    if (myState.equals(StateManager.marker))
 	    {
 		txId.unpack(os);
@@ -743,7 +743,7 @@
 		/*
 		 * Is there going to be a Uid to unpack?
 		 */
-		
+
 		if (!txId.equals(Uid.nullUid()))
 		    processUid.unpack(os);
 	    }
@@ -753,7 +753,7 @@
 		{
 		    tsLogger.arjLoggerI18N.warn("com.arjuna.ats.arjuna.StateManager_9");
 		}
-		
+
 		throw new IOException(tsLogger.log_mesg.getString("com.arjuna.ats.arjuna.StateManager_15"));
 	    }
 	}
@@ -763,7 +763,9 @@
 	}
 	catch (Exception e)
 	{
-	    throw new IOException(e.toString());
+	    IOException ioException = new IOException(e.toString());
+        ioException.initCause(e);
+        throw ioException;
 	}
     }
 
@@ -777,10 +779,10 @@
 	if (tsLogger.arjLogger.debugAllowed())
 	{
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PROTECTED,
-				     FacilityCode.FAC_STATE_MAN, 
+				     FacilityCode.FAC_STATE_MAN,
 				     "StateManager::terminate() for object-id "+get_uid());
 	}
-	
+
 	cleanup(true);
     }
 
@@ -788,7 +790,7 @@
     {
 	currentStatus = s;
     }
-    
+
     /**
      * Create object with specific uid. This constructor
      * is primarily used when recreating an existing object. The object type
@@ -805,7 +807,7 @@
     {
 	this(objUid, ObjectType.ANDPERSISTENT, attr);
     }
-    
+
 protected StateManager (Uid objUid, int ot)
     {
 	this(objUid, ot, null);
@@ -814,7 +816,7 @@
 protected StateManager (Uid objUid, int ot, ObjectName objName)
     {
 	objectName = objName;
-	
+
 	parseObjectName();
 
 	if (ot == ObjectType.NEITHER)
@@ -827,7 +829,7 @@
 	    modifyingActions = new Hashtable();
 	    usingActions = new Hashtable();
 	}
-	
+
 	activated = false;
 	currentlyActivated = false;
 	currentStatus = ObjectStatus.PASSIVE;
@@ -843,13 +845,13 @@
 	    tsLogger.arjLogger.debug(DebugLevel.CONSTRUCTORS, VisibilityLevel.VIS_PROTECTED,
 				     FacilityCode.FAC_STATE_MAN, "StateManager::StateManager( "+get_uid()+" )");
 	}
-    }    
+    }
 
 protected StateManager ()
     {
 	this(ObjectType.RECOVERABLE, null);
     }
-    
+
 protected StateManager (int ot)
     {
 	this(ot, null);
@@ -858,9 +860,9 @@
 protected StateManager (int ot, ObjectName objName)
     {
 	objectName = objName;
-	
+
 	parseObjectName();
-	
+
 	if (ot == ObjectType.NEITHER)
 	{
 	    modifyingActions = null;
@@ -892,7 +894,7 @@
 protected StateManager (ObjectName objName)
     {
 	objectName = objName;
-	
+
 	parseObjectName();
 
 	if (myType == ObjectType.NEITHER)
@@ -905,7 +907,7 @@
 	    modifyingActions = new Hashtable();
 	    usingActions = new Hashtable();
 	}
-	
+
 	activated = false;
 	currentlyActivated = false;
 	currentStatus = ObjectStatus.PASSIVE;
@@ -922,11 +924,11 @@
 				     FacilityCode.FAC_STATE_MAN, "StateManager::StateManager( "+objName+" )");
 	}
     }
-    
+
     /*
      * Protected non-virtual functions.
      */
-    
+
     /**
      * The object's state is about to be modified, and StateManager should
      * take a snapshot of the state if the object is being used within
@@ -942,29 +944,29 @@
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PROTECTED,
 				     FacilityCode.FAC_STATE_MAN, "StateManager::modified() for object-id "+get_uid());
 	}
-	
+
 	BasicAction action = BasicAction.Current();
 	RecoveryRecord record = null;
-	
+
 	if ((myType == ObjectType.NEITHER) || (currentStatus == ObjectStatus.DESTROYED)) /*  NEITHER => no recovery info */
 	{
 	    return true;
 	}
-    
+
 	if (currentStatus == ObjectStatus.PASSIVE)
 	{
 	    if (tsLogger.arjLoggerI18N.isWarnEnabled())
 		tsLogger.arjLoggerI18N.warn("com.arjuna.ats.arjuna.StateManager_10");
 	    activate();
 	}
-	
+
 	/*
 	 * Need not have gone through active if new object.
 	 */
 
 	if (currentStatus == ObjectStatus.PASSIVE_NEW)
 	    currentStatus = ObjectStatus.ACTIVE_NEW;
-    
+
 	if (action != null)
 	{
 	    /*
@@ -983,12 +985,12 @@
 		else
 		    modifyingActions.put(action.get_uid(), action);
 	    }
-	
+
 	    /* If here then its a new action */
-	
+
 	    OutputObjectState state = new OutputObjectState(objectUid, type());
 	    int rStatus = AddOutcome.AR_ADDED;
-	
+
 	    if (save_state(state, ObjectType.RECOVERABLE))
 	    {
 		if ((myType == ObjectType.RECOVERABLE) && (smAttributes.objectModel == ObjectModel.SINGLE))
@@ -997,14 +999,14 @@
 		}
 		else
 		    record = new PersistenceRecord(state, objectStore, this);
-	    
+
 		if ((rStatus = action.add(record)) != AddOutcome.AR_ADDED)
 		{
 		    synchronized(modifyingActions)
 		    {
 			modifyingActions.remove(action.get_uid());  // remember to unregister with action
 		    }
-		    
+
 		    record = null;
 
 		    return false;
@@ -1013,7 +1015,7 @@
 	    else
 		return false;
 	}
-	
+
 	return true;
     }
 
@@ -1033,14 +1035,14 @@
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PROTECTED,
 				     FacilityCode.FAC_STATE_MAN, "StateManager::persist() for object-id "+get_uid());
 	}
-     
+
 	if (currentStatus == ObjectStatus.ACTIVE)
 	{
 	    currentStatus = ObjectStatus.PASSIVE_NEW;
 	    myType = ObjectType.ANDPERSISTENT;
 	}
     }
-    
+
     /**
      * Object cleanup.
      * Attempt sane cleanup when object is deleted. Handle perverse cases
@@ -1050,7 +1052,7 @@
      * from the <code>terminate</code> method, or from elsewhere.
      * @see StateManager#terminate
      */
-    
+
 protected final synchronized void cleanup (boolean fromTerminate)
     {
 	if (tsLogger.arjLogger.debugAllowed())
@@ -1058,7 +1060,7 @@
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PROTECTED,
 				     FacilityCode.FAC_STATE_MAN, "StateManager::cleanup() for object-id "+get_uid());
 	}
-	
+
 	if (myType == ObjectType.NEITHER)
 	    return;
 
@@ -1069,16 +1071,16 @@
 	    if (usingActions != null)
 	    {
 		Enumeration e = usingActions.keys();
-	    
+
 		while (e.hasMoreElements())
 		{
 		    action = (BasicAction) usingActions.remove(e.nextElement());
-		    
+
 		    if (action != null)
 		    {
 			/*
 			 * Pop actions off using list.
-			 * 
+			 *
 			 * Don't check if action is running below so that
 			 * cadavers can be created in commit protocol too.
 			 */
@@ -1101,36 +1103,36 @@
 			     * If we get here via terminate its ok to do
 			     * a save_state.
 			     */
-	    
+
 			    if (fromTerminate)
 			    {
 				state = new OutputObjectState(objectUid, type());
-		
+
 				if (!save_state(state, myType))
 				{
 				    if (tsLogger.arjLoggerI18N.isWarnEnabled())
 					tsLogger.arjLoggerI18N.warn("com.arjuna.ats.arjuna.StateManager_12");
 				    /* force action abort */
-				    
+
 				    action.preventCommit();
 				}
 			    }
 			    else
 			    {
 				/* otherwise force action abort */
-				
+
 				action.preventCommit();
 			    }
-			    
+
 			    /*
 			     * This should be unnecessary - but just in
 			     * case.
 			     */
-	    
+
 			    setupStore(storeRoot);
-				
+
 			    record = new CadaverRecord(state, objectStore, this);
-			
+
 			    if ((rStatus = action.add(record)) != AddOutcome.AR_ADDED)
 				record = null;
 			}
@@ -1138,7 +1140,7 @@
 			if (currentlyActivated && (currentStatus != ObjectStatus.DESTROYED))
 			{
 			    record = new CadaverActivationRecord(this);
-			    
+
 			    if ((rStatus = action.add(record)) == AddOutcome.AR_ADDED)
 			    {
 				currentStatus = ObjectStatus.PASSIVE;
@@ -1150,7 +1152,7 @@
 		}
 	    }
 	}
-	
+
 	/*
 	 * Here the object must be either RECOVERABLE or PERSISTENT.
 	 * Whether or not an action exists we still need to reset the
@@ -1159,7 +1161,7 @@
 	 * changed from ACTIVE_NEW which might cause any running action to
 	 * abort.
 	 */
-    
+
 	if (currentStatus == ObjectStatus.ACTIVE_NEW)
 	{
 	    if ((myType == ObjectType.RECOVERABLE) && (smAttributes.objectModel == ObjectModel.SINGLE))
@@ -1190,18 +1192,18 @@
      *
      * @param rootName indicates the root of the object store.
      */
-    
+
 protected synchronized void setupStore (String rootName)
     {
 	if (tsLogger.arjLogger.debugAllowed())
 	{
-	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PROTECTED, FacilityCode.FAC_STATE_MAN, 
+	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PROTECTED, FacilityCode.FAC_STATE_MAN,
 				     "StateManager::setupStore ( "+((rootName != null) ? rootName : "null")+" )");
 	}
-	
+
 	if (!loadObjectState())
 	    return;
-	
+
 	/*
 	 * Already setup?
 	 * Assume type will not change once object is created.
@@ -1235,7 +1237,7 @@
 	    }
 
 	    /* No - destroy old store and create new */
-	    
+
 	    objectStore = null;
 	}
 
@@ -1257,7 +1259,7 @@
 
 	    int sharedStatus = ((smAttributes.objectModel == ObjectModel.SINGLE) ? ObjectStore.OS_UNSHARED : ObjectStore.OS_SHARED);
 	    ObjectName osObjName = null;
-	    
+
 	    if (objectName != null)
 	    {
 		try
@@ -1290,9 +1292,9 @@
 
 	    if (tsLogger.arjLoggerI18N.isWarnEnabled())
 		tsLogger.arjLoggerI18N.warn("com.arjuna.ats.arjuna.StateManager_13");
-	    
+
 	    throw new FatalError(tsLogger.log_mesg.getString("com.arjuna.ats.arjuna.StateManager_14"));
-		
+
 	    //		objectStore = new ObjectStore(ArjunaNames.Implementation_ObjectStore_VolatileStore(), storeRoot);
 	}
 
@@ -1311,11 +1313,11 @@
      * @return <code>true</code> if the object state should be loaded,
      * <code>false</code> otherwise.
      */
-    
+
 protected final boolean loadObjectState ()
     {
 	boolean load = (smAttributes.objectModel != ObjectModel.SINGLE);
-    
+
 	/*
 	 * MULTIPLE object model requires loading of state every
 	 * time, even if we are RECOVERABLE - we use the volatile
@@ -1328,14 +1330,14 @@
 	     * Must be SINGLE object model. So, is this the first
 	     * time? If so, load state.
 	     */
-		
+
 	    if ((myType != ObjectType.RECOVERABLE) && (!activated))
 		load = true;
 	}
 
 	return load;
     }
-    
+
     /*
      * Called ONLY by ActivationRecords!
      */
@@ -1346,7 +1348,7 @@
      * The second param tells why the action should be forgotten.
      * This aids in resetting the state correctly.
      */
-      
+
 protected final synchronized boolean forgetAction (BasicAction action,
 						   boolean committed,
 						   int recordType)
@@ -1358,7 +1360,7 @@
 				     +((action != null) ? action.get_uid() : Uid.nullUid())+")"
 				     +" for object-id "+objectUid);
 	}
-	
+
 	synchronized (modifyingActions)
 	{
 	    modifyingActions.remove(action.get_uid());
@@ -1371,7 +1373,7 @@
 		if (usingActions != null)
 		{
 		    usingActions.remove(action.get_uid());
-	
+
 		    if (usingActions.size() == 0)
 		    {
 			if (committed)
@@ -1408,7 +1410,7 @@
 				     +((action != null) ? action.get_uid() : Uid.nullUid())+")"
 				     +" for object-id "+objectUid);
 	}
-	
+
 	boolean result = false;
 
 	if (recordType != RecordType.RECOVERY)
@@ -1466,7 +1468,7 @@
 	else
 	    return false;
     }
-    
+
     /**
      * @return <code>true</code> if the object was locked,
      * <code>false</code> if the attempt would cause the thread to block.
@@ -1572,12 +1574,12 @@
 private boolean     activated;
 private boolean     currentlyActivated;
 private int	    currentStatus;
-private int	    initialStatus;    
+private int	    initialStatus;
 private int	    myType;
 private ObjectStore objectStore;
 private String      storeRoot;
 private Mutex       mutex = new Mutex();
-    
+
 private static final String marker = "#ARJUNA#";
 
 

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/Uid.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/Uid.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/Uid.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -24,7 +24,7 @@
  * Arjuna Solutions Limited,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: Uid.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -50,11 +50,11 @@
 
 /**
  * Implements a unique identity class.
- * 
+ *
  * @author Mark Little (mark at arjuna.com)
  * @version $Id: Uid.java 2342 2006-03-30 13:06:17Z  $
  * @since 1.0.
- * 
+ *
  * @message com.arjuna.ats.arjuna.common.Uid_1
  *          [com.arjuna.ats.arjuna.common.Uid_1] - cannot get local host.
  * @message com.arjuna.ats.arjuna.common.Uid_2
@@ -231,7 +231,7 @@
 					}
 
 					throw new FatalError(
-							tsLogger.log_mesg.getString("com.arjuna.ats.arjuna.common.Uid_2"));
+							tsLogger.log_mesg.getString("com.arjuna.ats.arjuna.common.Uid_2"), e);
 				}
 			}
 			else
@@ -425,13 +425,13 @@
 
 		if (this.equals(u))
 			return false ;
-		
+
 		if (LAST_RESOURCE_UID.equals(this))
 			return false ;
-		
+
 		if (LAST_RESOURCE_UID.equals(u))
 			return true ;
-		
+
 		if (hostAddr < u.hostAddr)
 			return true;
 		else
@@ -462,10 +462,10 @@
 
 		if (this.equals(u))
 			return false ;
-		
+
 		if (LAST_RESOURCE_UID.equals(this))
 			return true ;
-		
+
 		if (LAST_RESOURCE_UID.equals(u))
 			return false ;
 
@@ -522,7 +522,7 @@
 	{
 		return MAX_UID;
 	}
-	
+
 	/**
 	 * Return the minimum Uid (-80000000:-80000000:-80000000:-80000000)
 	 */
@@ -534,7 +534,7 @@
 	/*
 	 * Serialization methods. Similar to buffer packing. If the Uid is invalid
 	 * the an IOException is thrown.
-	 * 
+	 *
 	 * @since JTS 2.1.
 	 */
 
@@ -555,7 +555,7 @@
 	/*
 	 * Serialization methods. Similar to buffer unpacking. If the
 	 * unserialization fails then an IOException is thrown.
-	 * 
+	 *
 	 * @since JTS 2.1.
 	 */
 
@@ -685,8 +685,8 @@
 	private static Uid NIL_UID = new Uid("0:0:0:0") ;
 
 	private static Uid LAST_RESOURCE_UID = new Uid("0:0:0:1") ;
-	
+
 	private static Uid MAX_UID = new Uid("7fffffff:7fffffff:7fffffff:7fffffff") ;
-	
+
 	private static Uid MIN_UID = new Uid("-80000000:-80000000:-80000000:-80000000") ;
 }

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/arjPropertyManager.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/arjPropertyManager.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/arjPropertyManager.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -48,7 +48,7 @@
     {
         return propertyManager;
     }
-    
+
     static
     {
         /**
@@ -67,7 +67,9 @@
         }
         catch (Exception e)
         {
-            throw new ExceptionInInitializerError(e.toString());
+            ExceptionInInitializerError error = new ExceptionInInitializerError(e.toString());
+            error.initCause(e);
+            throw error;
         }
     }
 }

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/ActionHierarchy.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/ActionHierarchy.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/ActionHierarchy.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -24,7 +24,7 @@
  * Arjuna Solutions Limited,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: ActionHierarchy.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -69,7 +69,7 @@
 				     VisibilityLevel.VIS_PUBLIC,
 				     FacilityCode.FAC_ATOMIC_ACTION, "ActionHierarchy::ActionHierarchy("+depth+")");
 	}
-	
+
 	hierarchy = null;
 	maxHierarchyDepth = depth;
 	currentDepth = 0;
@@ -92,7 +92,7 @@
 	hierarchy = null;
 	maxHierarchyDepth = theCopy.maxHierarchyDepth;
 	currentDepth = theCopy.currentDepth;
-	
+
 	if (maxHierarchyDepth > 0)
 	{
 	    hierarchy = new ActionInfo[maxHierarchyDepth];
@@ -100,7 +100,7 @@
 	    for (int i = 0; i < maxHierarchyDepth; i++)
 		hierarchy[i] = null;
 	}
-    
+
 	for (int i = 0; i < currentDepth; i++)
 	{
 	    hierarchy[i] = new ActionInfo(theCopy.hierarchy[i]);
@@ -119,13 +119,13 @@
 	    strm.println("\tAction Uids : NULL");
 	else
 	{
-	    strm.println("\tAction Uids :");	    
+	    strm.println("\tAction Uids :");
 
 	    /*
 	     * No need to check if hierarchy[i] is set, since currentDepth
 	     * implies it is.
 	     */
-	
+
 	    for (int i = 0; i < currentDepth; i++)
 		strm.println("\t\t"+hierarchy[i].actionUid);
 	}
@@ -142,16 +142,16 @@
     public synchronized void copy (ActionHierarchy c)
     {
 	/* Beware of A = A */
-    
+
 	if (this == c)
 	    return;
 
 	if (hierarchy != null)
 	    hierarchy = null;
-	
+
 	currentDepth = c.currentDepth;
 	maxHierarchyDepth = c.maxHierarchyDepth;
-      
+
 	if (maxHierarchyDepth > 0)
 	{
 	    hierarchy = new ActionInfo[maxHierarchyDepth];
@@ -167,7 +167,7 @@
     /**
      * Overloads Object.equals.
      */
-    
+
     public final boolean equals (ActionHierarchy other)
     {
 	boolean same = true;
@@ -201,7 +201,7 @@
     {
 	return add(actionId, ActionType.TOP_LEVEL);
     }
-    
+
     /**
      * Add the transaction id at the specified level.
      *
@@ -216,7 +216,7 @@
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
 				     FacilityCode.FAC_ATOMIC_ACTION, "ActionHierarchy::add("+actionId+", "+at+")");
 	}
-	
+
 	boolean result = true;
 
 	if (currentDepth >= maxHierarchyDepth)
@@ -229,7 +229,7 @@
 	    if (newHier != null)
 	    {
 		maxHierarchyDepth = newDepth;
-	    
+
 		for (int i = 0; i < currentDepth; i++)
 		    newHier[i] = hierarchy[i];
 
@@ -307,7 +307,7 @@
      * CAREFULLY unpack the 'new' hierarchy. We unpack into
      * a temporary to ensure that the current hierarchy is not corrupted.
      *
-     * @message com.arjuna.ats.arjuna.coordinator.ActionHierarchy_1 [com.arjuna.ats.arjuna.coordinator.ActionHierarchy_1] - Memory exhausted. 
+     * @message com.arjuna.ats.arjuna.coordinator.ActionHierarchy_1 [com.arjuna.ats.arjuna.coordinator.ActionHierarchy_1] - Memory exhausted.
      */
 
     public void unpack (InputBuffer state) throws IOException
@@ -324,14 +324,16 @@
 	}
 	catch (OutOfMemoryError ex)
 	{
-	    throw new IOException(tsLogger.log_mesg.getString("com.arjuna.ats.arjuna.coordinator.ActionHierarchy_1"));
+        IOException ioException = new IOException(tsLogger.log_mesg.getString("com.arjuna.ats.arjuna.coordinator.ActionHierarchy_1"));
+        ioException.initCause(ex);
+        throw ioException;
 	}
-	
+
 	for (int i = 0; i < newDepth; i++)
 	{
 	    temp.actionUid.unpack(state);
 	    temp.actionType = state.unpackInt();
-	    
+
 	    newHier.add(temp.actionUid, temp.actionType);
 	}
 
@@ -374,7 +376,7 @@
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
 				     FacilityCode.FAC_ATOMIC_ACTION, "ActionHierarchy::findCommonPrefix()");
 	}
-	
+
 	int common = 0;
 	int max = oldHierarchy.depth();
 
@@ -386,11 +388,11 @@
 
 	if (tsLogger.arjLogger.debugAllowed())
 	{
-	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, 
-				     FacilityCode.FAC_ATOMIC_ACTION, 
+	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
+				     FacilityCode.FAC_ATOMIC_ACTION,
 				     "ActionHierarchy::::findCommonPrefix(): prefix is "+common);
 	}
-	
+
 	return common;
     }
 
@@ -441,7 +443,7 @@
     }
 
     public static final int DEFAULT_HIERARCHY_DEPTH = 5;
-    
+
     private ActionInfo[] hierarchy;
     private int          maxHierarchyDepth;
     private int          currentDepth;

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/exceptions/FatalError.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/exceptions/FatalError.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/exceptions/FatalError.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -24,7 +24,7 @@
  * Hewlett-Packard Arjuna Labs,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK. 
+ * UK.
  *
  * $Id: FatalError.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -44,14 +44,59 @@
 
 public class FatalError extends Error
 {
+    /**
+     * Constructs a new error with <code>null</code> as its detail message.
+     * The cause is not initialized, and may subsequently be initialized by a
+     * call to {@link #initCause}.
+     */
+    public FatalError() {
+        super();
+    }
 
-public FatalError ()
-    {
-	super();
+    /**
+     * Constructs a new error with the specified detail message.  The
+     * cause is not initialized, and may subsequently be initialized by
+     * a call to {@link #initCause}.
+     *
+     * @param message the detail message. The detail message is saved for
+     *                later retrieval by the {@link #getMessage()} method.
+     */
+    public FatalError(String message) {
+        super(message);
     }
 
-public FatalError (String s)
-    {
-	super(s);
+    /**
+     * Constructs a new error with the specified detail message and
+     * cause.  <p>Note that the detail message associated with
+     * <code>cause</code> is <i>not</i> automatically incorporated in
+     * this error's detail message.
+     *
+     * @param message the detail message (which is saved for later retrieval
+     *                by the {@link #getMessage()} method).
+     * @param cause   the cause (which is saved for later retrieval by the
+     *                {@link #getCause()} method).  (A <tt>null</tt> value is
+     *                permitted, and indicates that the cause is nonexistent or
+     *                unknown.)
+     * @since 1.4
+     */
+    public FatalError(String message, Throwable cause) {
+        super(message, cause);
     }
+
+    /**
+     * Constructs a new error with the specified cause and a detail
+     * message of <tt>(cause==null ? null : cause.toString())</tt> (which
+     * typically contains the class and detail message of <tt>cause</tt>).
+     * This constructor is useful for errors that are little more than
+     * wrappers for other throwables.
+     *
+     * @param cause the cause (which is saved for later retrieval by the
+     *              {@link #getCause()} method).  (A <tt>null</tt> value is
+     *              permitted, and indicates that the cause is nonexistent or
+     *              unknown.)
+     * @since 1.4
+     */
+    public FatalError(Throwable cause) {
+        super(cause);
+    }
 }

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/exceptions/ObjectStoreError.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/exceptions/ObjectStoreError.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/exceptions/ObjectStoreError.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -24,7 +24,7 @@
  * Arjuna Solutions Limited,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: ObjectStoreError.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -44,16 +44,60 @@
 
 public class ObjectStoreError extends Error
 {
+    /**
+     * Constructs a new error with <code>null</code> as its detail message.
+     * The cause is not initialized, and may subsequently be initialized by a
+     * call to {@link #initCause}.
+     */
+    public ObjectStoreError() {
+        super();
+    }
 
-public ObjectStoreError ()
-    {
-	super();
+    /**
+     * Constructs a new error with the specified detail message.  The
+     * cause is not initialized, and may subsequently be initialized by
+     * a call to {@link #initCause}.
+     *
+     * @param message the detail message. The detail message is saved for
+     *                later retrieval by the {@link #getMessage()} method.
+     */
+    public ObjectStoreError(String message) {
+        super(message);
     }
 
-public ObjectStoreError (String s)
-    {
-	super(s);
+    /**
+     * Constructs a new error with the specified detail message and
+     * cause.  <p>Note that the detail message associated with
+     * <code>cause</code> is <i>not</i> automatically incorporated in
+     * this error's detail message.
+     *
+     * @param message the detail message (which is saved for later retrieval
+     *                by the {@link #getMessage()} method).
+     * @param cause   the cause (which is saved for later retrieval by the
+     *                {@link #getCause()} method).  (A <tt>null</tt> value is
+     *                permitted, and indicates that the cause is nonexistent or
+     *                unknown.)
+     * @since 1.4
+     */
+    public ObjectStoreError(String message, Throwable cause) {
+        super(message, cause);
     }
-    
+
+    /**
+     * Constructs a new error with the specified cause and a detail
+     * message of <tt>(cause==null ? null : cause.toString())</tt> (which
+     * typically contains the class and detail message of <tt>cause</tt>).
+     * This constructor is useful for errors that are little more than
+     * wrappers for other throwables.
+     *
+     * @param cause the cause (which is saved for later retrieval by the
+     *              {@link #getCause()} method).  (A <tt>null</tt> value is
+     *              permitted, and indicates that the cause is nonexistent or
+     *              unknown.)
+     * @since 1.4
+     */
+    public ObjectStoreError(Throwable cause) {
+        super(cause);
+    }
 }
 

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/exceptions/ObjectStoreException.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/exceptions/ObjectStoreException.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/exceptions/ObjectStoreException.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -24,7 +24,7 @@
  * Arjuna Solutions Limited,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: ObjectStoreException.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -44,22 +44,63 @@
 
 public class ObjectStoreException extends Exception
 {
-    static final long serialVersionUID = -1228565199285342890L;    
-    
-    public ObjectStoreException ()
-    {
-	super();
+    static final long serialVersionUID = -1228565199285342890L;
+
+    /**
+     * Constructs a new exception with <code>null</code> as its detail message.
+     * The cause is not initialized, and may subsequently be initialized by a
+     * call to {@link #initCause}.
+     */
+    public ObjectStoreException() {
+        super();
     }
 
-    public ObjectStoreException (String s)
-    {
-	super(s);
+    /**
+     * Constructs a new exception with the specified detail message.  The
+     * cause is not initialized, and may subsequently be initialized by
+     * a call to {@link #initCause}.
+     *
+     * @param message the detail message. The detail message is saved for
+     *                later retrieval by the {@link #getMessage()} method.
+     */
+    public ObjectStoreException(String message) {
+        super(message);
     }
-    
-    public ObjectStoreException (final Throwable ex)
-    {
-        super(ex);
+
+    /**
+     * Constructs a new exception with the specified detail message and
+     * cause.  <p>Note that the detail message associated with
+     * <code>cause</code> is <i>not</i> automatically incorporated in
+     * this exception's detail message.
+     *
+     * @param message the detail message (which is saved for later retrieval
+     *                by the {@link #getMessage()} method).
+     * @param cause   the cause (which is saved for later retrieval by the
+     *                {@link #getCause()} method).  (A <tt>null</tt> value is
+     *                permitted, and indicates that the cause is nonexistent or
+     *                unknown.)
+     * @since 1.4
+     */
+    public ObjectStoreException(String message, Throwable cause) {
+        super(message, cause);
     }
-    
+
+    /**
+     * Constructs a new exception with the specified cause and a detail
+     * message of <tt>(cause==null ? null : cause.toString())</tt> (which
+     * typically contains the class and detail message of <tt>cause</tt>).
+     * This constructor is useful for exceptions that are little more than
+     * wrappers for other throwables (for example, {@link
+     * java.security.PrivilegedActionException}).
+     *
+     * @param cause the cause (which is saved for later retrieval by the
+     *              {@link #getCause()} method).  (A <tt>null</tt> value is
+     *              permitted, and indicates that the cause is nonexistent or
+     *              unknown.)
+     * @since 1.4
+     */
+    public ObjectStoreException(Throwable cause) {
+        super(cause);
+    }
 }
 

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/recovery/TransactionStatusManager.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/recovery/TransactionStatusManager.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/recovery/TransactionStatusManager.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -115,7 +115,7 @@
     * Removes the TransactionStatusManager from the object store
     * and closes down the listener thread.
     */
-   
+
    // TODO consider adding a shutdown operation (signature change)
    public void finalize()
    {
@@ -183,7 +183,7 @@
 					  new Object[]{getListenerHostName(), getListenerPort(-1)});
 	  }
 
-	  throw new com.arjuna.ats.arjuna.exceptions.FatalError(tsLogger.log_mesg.getString("com.arjuna.ats.arjuna.recovery.TransactionStatusManager_9"));
+	  throw new com.arjuna.ats.arjuna.exceptions.FatalError(tsLogger.log_mesg.getString("com.arjuna.ats.arjuna.recovery.TransactionStatusManager_9"), ex);
       }
    }
 

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/gandiva/nameservice/JNS.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/gandiva/nameservice/JNS.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/gandiva/nameservice/JNS.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -24,7 +24,7 @@
  * Arjuna Solutions Limited,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: JNS.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -93,28 +93,28 @@
 public String firstAttributeName (String objName) throws IOException
     {
 	Enumeration e = arjPropertyManager.propertyManager.propertyNames();
-	
+
 	if (e.hasMoreElements())
 	    return (String) e.nextElement();
 	else
 	    throw new IOException("No attributes.");
     }
-    
+
 public String nextAttributeName (String objName, String attrName) throws IOException
     {
 	Enumeration e = arjPropertyManager.propertyManager.propertyNames();
-	
+
 	while (e.hasMoreElements())
 	{
 	    String s = (String) e.nextElement();
-	    
+
 	    if (s.equals(objName+"."+attrName))
 	    {
 		if (e.hasMoreElements())
 		    return (String) e.nextElement();
 	    }
 	}
-	
+
 	throw new IOException("No more attributes.");
     }
 
@@ -145,7 +145,7 @@
 	else
 	    throw new IOException("No such attribute.");
     }
-    
+
 public String getStringAttribute (String objName, String attrName) throws IOException
     {
 	String attr = arjPropertyManager.propertyManager.getProperty(objName+"."+attrName, null);
@@ -191,9 +191,9 @@
 		throw new IOException("Not an ObjectName.");
 	}
 	else
-	    throw new IOException("No such attribute.");	
+	    throw new IOException("No such attribute.");
     }
-    
+
 public ClassName getClassNameAttribute (String objName, String attrName) throws IOException
     {
 	String attr = arjPropertyManager.propertyManager.getProperty(objName+"."+attrName, null);
@@ -215,9 +215,9 @@
 		throw new IOException("Not a ClassName.");
 	}
 	else
-	    throw new IOException("No such attribute.");	
+	    throw new IOException("No such attribute.");
     }
-    
+
 public Uid getUidAttribute (String objName, String attrName) throws IOException
     {
 	String attr = arjPropertyManager.propertyManager.getProperty(objName+"."+attrName, null);
@@ -239,37 +239,37 @@
 		throw new IOException("Not a Uid.");
 	}
 	else
-	    throw new IOException("No such attribute.");	
+	    throw new IOException("No such attribute.");
     }
-    
+
 public String setLongAttribute (String objName, String attrName, long value) throws IOException
     {
 	arjPropertyManager.propertyManager.setProperty(objName+"."+attrName, new String(SIGNED_NUMBER+""+value));
 
 	return null;
     }
-    
+
 public String setStringAttribute (String objName, String attrName, String value) throws IOException
     {
 	arjPropertyManager.propertyManager.setProperty(objName+"."+attrName, new String(STRING+""+value));
 
 	return null;
     }
-    
+
 public String setObjectNameAttribute (String objName, String attrName, ObjectName value) throws IOException
     {
 	arjPropertyManager.propertyManager.setProperty(objName+"."+attrName, new String(OBJECTNAME+""+value.stringForm()));
 
 	return null;
     }
-    
+
 public String setClassNameAttribute (String objName, String attrName, ClassName value) throws IOException
     {
 	arjPropertyManager.propertyManager.setProperty(objName+"."+attrName, new String(CLASSNAME+""+value.stringForm()));
 
 	return null;
     }
-    
+
 public String setUidAttribute (String objName, String attrName, Uid value) throws IOException
     {
 	arjPropertyManager.propertyManager.setProperty(objName+"."+attrName, new String(CLASSNAME+""+value.stringForm()));
@@ -281,14 +281,14 @@
     {
 	return arjPropertyManager.propertyManager.removeProperty(objName+"."+attrName);
     }
-    
+
 public String uniqueAttributeName (String objName) throws IOException
     {
 	Uid u = new Uid();
 
 	return u.stringForm();
     }
-    
+
 public ObjectName uniqueObjectName () throws IOException
     {
 	Uid uid = new Uid();
@@ -320,5 +320,5 @@
 private static final char UID = '+';
 
 private static final String jnsName = "JNS:";
-    
+
 }

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	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/ActionStore.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -24,7 +24,7 @@
  * Arjuna Solutions Limited,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: ActionStore.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -70,7 +70,7 @@
     {
 	return ObjectStoreType.ACTION;
     }
-    
+
     /**
      * @return current state of object. Assumes that genPathName allocates
      * enough extra space to allow extra chars to be added.
@@ -82,7 +82,7 @@
 public int currentState (Uid objUid, String tName) throws ObjectStoreException
     {
 	int theState = ObjectStore.OS_UNKNOWN;
-    
+
 	if (storeValid())
 	{
 	    String path = genPathName(objUid, tName, ObjectStore.OS_ORIGINAL);
@@ -96,11 +96,11 @@
 	if (tsLogger.arjLoggerI18N.debugAllowed())
 	{
 	    tsLogger.arjLoggerI18N.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
-					 FacilityCode.FAC_OBJECT_STORE, 
-					 "com.arjuna.ats.internal.arjuna.objectstore.ActionStore_1", 
+					 FacilityCode.FAC_OBJECT_STORE,
+					 "com.arjuna.ats.internal.arjuna.objectstore.ActionStore_1",
 					 new Object[]{objUid, tName,ObjectStore.stateStatusString(theState)});
 	}
-	
+
 	return theState;
     }
 
@@ -116,7 +116,7 @@
 	if (tsLogger.arjLogger.debugAllowed())
 	{
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
-				     FacilityCode.FAC_OBJECT_STORE, 
+				     FacilityCode.FAC_OBJECT_STORE,
 				     "ActionStore.commit_state("+objUid+", "+tName+")");
 	}
 
@@ -129,7 +129,7 @@
 
 	if (currentState(objUid, tName) == ObjectStore.OS_COMMITTED)
 	    result = true;
-    
+
 	return result;
     }
 
@@ -140,7 +140,7 @@
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
 				     FacilityCode.FAC_OBJECT_STORE, "ActionStore.hide_state("+u+", "+tn+")");
 	}
-	
+
 	return false;
     }
 
@@ -151,7 +151,7 @@
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
 				     FacilityCode.FAC_OBJECT_STORE, "ActionStore.reveal_state("+u+", "+tn+")");
 	}
-	
+
 	return false;
     }
 
@@ -162,7 +162,7 @@
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
 				     FacilityCode.FAC_OBJECT_STORE, "ActionStore.read_committed("+storeUid+", "+tName+")");
 	}
-	
+
 	return super.read_committed(storeUid, tName);
     }
 
@@ -173,7 +173,7 @@
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
 				     FacilityCode.FAC_OBJECT_STORE, "ActionStore.read_uncommitted("+u+", "+tn+")");
 	}
-	
+
 	return null;
     }
 
@@ -184,7 +184,7 @@
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
 				     FacilityCode.FAC_OBJECT_STORE, "ActionStore.remove_committed("+storeUid+", "+tName+")");
 	}
-	
+
 	return super.remove_committed(storeUid, tName);
     }
 
@@ -195,7 +195,7 @@
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
 				     FacilityCode.FAC_OBJECT_STORE, "ActionStore.remove_uncommitted("+u+", "+tn+")");
 	}
-	
+
 	return false;
     }
 
@@ -206,7 +206,7 @@
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
 				     FacilityCode.FAC_OBJECT_STORE, "ActionStore.write_committed("+storeUid+", "+tName+")");
 	}
-	
+
 	return super.write_committed(storeUid, tName, state);
     }
 
@@ -217,7 +217,7 @@
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
 				     FacilityCode.FAC_OBJECT_STORE, "ActionStore.write_uncommitted("+u+", "+tn+", "+s+")");
 	}
-	
+
 	return false;
     }
 
@@ -229,13 +229,13 @@
     public static ClassName name ()
     {
 	return ArjunaNames.Implementation_ObjectStore_ActionStore();
-    }    
+    }
 
     /**
      * Have to return as a ShadowingStore because of
      * inheritence.
      */
-    
+
     public static ShadowingStore create ()
     {
 	return new ActionStore("");
@@ -253,7 +253,7 @@
 	String location = (String) param[0];
 	Integer shareStatus = (Integer) param[1];
 	int ss = ObjectStore.OS_UNSHARED;
-	
+
 	if (shareStatus != null)
 	{
 	    try
@@ -270,7 +270,7 @@
 		}
 	    }
 	}
-	
+
 	return new ActionStore(location, ss);
     }
 
@@ -281,7 +281,7 @@
 	else
 	    return new ActionStore(param);
     }
-    
+
     protected ActionStore (String locationOfStore)
     {
 	this(locationOfStore, ObjectStore.OS_UNSHARED);
@@ -301,8 +301,8 @@
 		tsLogger.arjLogger.warn(e.getMessage());
 
 	    super.makeInvalid();
-	    
-	    throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString());
+
+	    throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString(), e);
 	}
     }
 
@@ -310,7 +310,7 @@
     {
 	this(ObjectStore.OS_UNSHARED);
     }
-    
+
     protected ActionStore (int shareStatus)
     {
 	super(shareStatus);
@@ -320,7 +320,7 @@
     {
 	super(objName);
     }
-    
+
     protected synchronized boolean setupStore (String location) throws ObjectStoreException
     {
 	if (!checkSync)
@@ -342,7 +342,7 @@
 
 	return super.setupStore(location);
     }
-    
+
     private static boolean checkSync = false;
 
 }

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	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/FileSystemStore.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -24,7 +24,7 @@
  * Arjuna Solutions Limited,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: FileSystemStore.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -84,14 +84,14 @@
     public FileSystemStore (String locationOfStore, int ss)
     {
 	super(ss);
-	
+
 	if (tsLogger.arjLogger.debugAllowed())
 	{
 	    tsLogger.arjLogger.debug(DebugLevel.CONSTRUCTORS, VisibilityLevel.VIS_PUBLIC,
-				     FacilityCode.FAC_OBJECT_STORE, 
+				     FacilityCode.FAC_OBJECT_STORE,
 				     "FileSystemStore.FileSystemStore("+locationOfStore+")");
 	}
-	
+
 	fullStoreName = null;
 	localStoreRoot = null;
 	isValid = true;
@@ -106,7 +106,7 @@
 
 	    tsLogger.arjLogger.warn(e.getMessage());
 
-	    throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString());
+	    throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString(), e);
 	}
     }
 
@@ -140,17 +140,17 @@
 
 	    tsLogger.arjLogger.warn(e.getMessage());
 
-	    throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString());
+	    throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString(), e);
 	}
     }
-    
+
     public String getStoreName ()
     {
 	return localStoreRoot;
     }
 
     /*
-     * read an uncommitted instance of State out of the object store. 
+     * read an uncommitted instance of State out of the object store.
      * The instance is identified by the unique id and type
      */
 
@@ -172,7 +172,7 @@
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
 				     FacilityCode.FAC_OBJECT_STORE, "FileSystemStore.read_uncommitted("+storeUid+", "+tName+")");
 	}
-	
+
 	return read_state(storeUid, tName, ObjectStore.OS_SHADOW);
     }
 
@@ -181,7 +181,7 @@
 	if (tsLogger.arjLogger.debugAllowed())
 	{
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
-				     FacilityCode.FAC_OBJECT_STORE, 
+				     FacilityCode.FAC_OBJECT_STORE,
 				     "FileSystemStore.remove_committed("+storeUid+", "+tName+")");
 	}
 
@@ -193,10 +193,10 @@
 	if (tsLogger.arjLogger.debugAllowed())
 	{
        	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
-				     FacilityCode.FAC_OBJECT_STORE, 
+				     FacilityCode.FAC_OBJECT_STORE,
 				     "FileSystemStore.remove_uncommitted("+storeUid+", "+tName+")");
 	}
-	
+
 	return remove_state(storeUid, tName, ObjectStore.OS_SHADOW);
     }
 
@@ -205,10 +205,10 @@
 	if (tsLogger.arjLogger.debugAllowed())
 	{
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
-				     FacilityCode.FAC_OBJECT_STORE, 
+				     FacilityCode.FAC_OBJECT_STORE,
 				     "FileSystemStore.write_committed("+storeUid+", "+tName+")");
 	}
-	
+
 	return write_state(storeUid, tName, state, ObjectStore.OS_ORIGINAL);
     }
 
@@ -217,10 +217,10 @@
 	if (tsLogger.arjLogger.debugAllowed())
 	{
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
-				     FacilityCode.FAC_OBJECT_STORE, 
+				     FacilityCode.FAC_OBJECT_STORE,
 				     "FileSystemStore.write_uncommitted("+storeUid+", "+tName+", "+state+")");
 	}
-	
+
 	return write_state(storeUid, tName, state, ObjectStore.OS_SHADOW);
     }
 
@@ -233,12 +233,12 @@
     {
 	isValid = false;
     }
-    
+
     public final synchronized void makeValid ()
     {
 	isValid = true;
     }
-    
+
     /**
      * Given a type name initialise the <code>state</code> to contains all of
      * the Uids of objects of that type
@@ -249,17 +249,17 @@
 	if (tsLogger.arjLogger.debugAllowed())
 	{
        	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
-				     FacilityCode.FAC_OBJECT_STORE, 
+				     FacilityCode.FAC_OBJECT_STORE,
 				     "FileSystemStore.allObjUids("+tName+", "+state+", "+match+")");
 	}
-	
+
 	String directory = null;
 	OutputObjectState store = new OutputObjectState();
-	
+
 	/*
 	 * If typename starts with a '/' then skip over it.
 	 */
-	
+
 	if ((tName != null) && (tName.charAt(0) == File.separatorChar))
 	{
 	    String s = tName.substring(1, tName.length());
@@ -270,7 +270,7 @@
 
 	File f = new File(directory);
 	String[] entry = f.list();
-    
+
 	if ((entry != null) && (entry.length > 0))
 	{
 	    for (int i = 0; i < entry.length; i++)
@@ -282,7 +282,7 @@
 		    if (!aUid.valid() || (aUid.equals(Uid.nullUid())))
 		    {
 			String revealed = revealedId(entry[i]);
-			
+
 			// don't want to give the same id twice.
 
 			if (present(revealed, entry))
@@ -308,7 +308,7 @@
 		}
 		catch (IOException e)
 		{
-		    throw new ObjectStoreException(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore_2a"));
+		    throw new ObjectStoreException(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore_2a"), e);
 		}
 	    }
 	}
@@ -319,7 +319,7 @@
 	}
 	catch (IOException e)
 	{
-	    throw new ObjectStoreException(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore_3"));
+	    throw new ObjectStoreException(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore_3"), e);
 	}
 
 	state.setBuffer(store.buffer());
@@ -328,7 +328,7 @@
 
 	return true;
     }
- 
+
     public boolean allTypes (InputObjectState foundTypes) throws ObjectStoreException
     {
 	if (tsLogger.arjLogger.debugAllowed())
@@ -336,7 +336,7 @@
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
 				     FacilityCode.FAC_OBJECT_STORE, "FileSystemStore.allTypes("+foundTypes+")");
 	}
-	
+
 	boolean result = true;
 	String directory = new String(fullStoreName);
 	File f = new File(directory);
@@ -346,13 +346,13 @@
 	    return true;
 
 	OutputObjectState store = new OutputObjectState();
-	
+
 	for (int i = 0; i < entry.length; i++)
 	{
 	    if (!supressEntry(entry[i]))
 	    {
 		File tmpFile = new File(directory+File.separator+entry[i]);
-		
+
 		if (tmpFile.isDirectory())
 		{
 		    try
@@ -363,7 +363,7 @@
 		    }
 		    catch (IOException e)
 		    {
-			throw new ObjectStoreException(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore_4"));
+			throw new ObjectStoreException(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore_4"), e);
 		    }
 		}
 
@@ -377,7 +377,7 @@
 	}
 	catch (IOException e)
 	{
-	    throw new ObjectStoreException(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore_5"));
+	    throw new ObjectStoreException(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore_5"), e);
 	}
 
 	foundTypes.setBuffer(store.buffer());
@@ -418,9 +418,9 @@
 
     public static ClassName name ()
     {
-	return ArjunaNames.Implementation_ObjectStore_FileSystemStore();	
-    }    
-    
+	return ArjunaNames.Implementation_ObjectStore_FileSystemStore();
+    }
+
     protected abstract InputObjectState read_state (Uid u, String tn, int s) throws ObjectStoreException;
     protected abstract boolean remove_state (Uid u, String tn, int s) throws ObjectStoreException;
     protected abstract boolean write_state (Uid u, String tn, OutputObjectState buff, int s) throws ObjectStoreException;
@@ -428,12 +428,12 @@
     /**
      * Turn file sync on and off.
      */
-    
+
     protected synchronized final void syncOn ()
     {
 	FileSystemStore.doSync = true;
     }
-    
+
     protected synchronized final void syncOff ()
     {
 	FileSystemStore.doSync = false;
@@ -469,7 +469,7 @@
 
 	return fileLock.unlock();
     }
-    
+
     /**
      * Unlock and close the file. Note that if the unlock fails we set
      * the return value to false to indicate an error but rely on the
@@ -483,7 +483,7 @@
             tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PRIVATE,
                                      FacilityCode.FAC_OBJECT_STORE, "FileSystemStore.closeAndUnlock("+fd+", "+ifile+", "+ofile+")");
         }
-        
+
         boolean closedOk = unlock(fd);
 
         try
@@ -508,10 +508,10 @@
             tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PRIVATE,
                                      FacilityCode.FAC_OBJECT_STORE, "FileSystemStore.openAndLock("+fname+", "+FileLock.modeString(lmode)+", "+create+")");
         }
-        
+
         //      File fd = (File) FdCache(fname);
         File fd = null;
-        
+
         if (fd == null)
         {
             fd = new File(fname);
@@ -568,7 +568,7 @@
         else
         {
             //      FileLock fl = new FileLock(to);
-                
+
             if (!from.exists())
             {
                 /*
@@ -595,7 +595,7 @@
 
                 return true;
             }
-            
+
             /*
              * Let let crash recovery deal with this!
              */
@@ -607,7 +607,7 @@
                 boolean res = from.renameTo(to);
 
                 //              fl.unlock();
-                
+
                 return true;
             }
             /*
@@ -627,7 +627,7 @@
     protected FileSystemStore (int ss)
     {
 	super(ss);
-	
+
 	fullStoreName = null;
 	localStoreRoot = null;
 	isValid = true;
@@ -638,10 +638,10 @@
 	if (tsLogger.arjLogger.debugAllowed())
 	{
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PROTECTED,
-				     FacilityCode.FAC_OBJECT_STORE, 
+				     FacilityCode.FAC_OBJECT_STORE,
 				     "FileSystemStore.allTypes("+foundTypes+", "+root+")");
 	}
-	
+
 	boolean result = true;
 	String directory = new String(fullStoreName + File.separator + root);
 	File f = new File(directory);
@@ -664,7 +664,7 @@
                 if ( pack.length() > 0 )
                 {
 			        foundTypes.packString(root+File.separator+pack);
-			
+
 			        result = allTypes(foundTypes, root+File.separator+pack);
                 }
 			}
@@ -673,7 +673,7 @@
 		    }
 		    catch (IOException e)
 		    {
-			throw new ObjectStoreException(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore_7"));
+			throw new ObjectStoreException(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore_7"), e);
 		    }
 		}
 	    }
@@ -681,7 +681,7 @@
 
 	return result;
     }
-    
+
     /**
      * @return the file name for the state of the object
      * identified by the Uid and TypeName. If the StateType argument
@@ -696,10 +696,10 @@
 	if (tsLogger.arjLogger.debugAllowed())
 	{
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PROTECTED,
-				     FacilityCode.FAC_OBJECT_STORE, 
+				     FacilityCode.FAC_OBJECT_STORE,
 				     "FileSystemStore.genPathName("+objUid+", "+tName+", "+ostype+")");
 	}
-	
+
 	String storeName = locateStore(getStoreName());
 	String cPtr = null;
 	String fname = null;
@@ -725,7 +725,7 @@
 	 * storeName always ends in '/' so we can remove any
 	 * at the start of the type name.
 	 */
-	
+
 	if (cPtr.charAt(0) == File.separatorChar)
 	    cPtr = cPtr.substring(1, cPtr.length());
 
@@ -737,7 +737,7 @@
 	/*
 	 * Make sure we don't end in a '/'.
 	 */
-	
+
 	if (fname.charAt(fname.length() -1) == File.separatorChar)
 	    fname = fname.substring(0, fname.length() -2);
 
@@ -751,9 +751,9 @@
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PROTECTED,
 				     FacilityCode.FAC_OBJECT_STORE, "FileSystemStore.setupStore("+localOSRoot+")");
 	}
-	
+
 	isValid = true;
-    
+
 	if (localOSRoot == null)
 	    localOSRoot = "";
 
@@ -788,7 +788,7 @@
     {
 	return value;
     }
-    
+
     /**
      * Attempt to build up the object store in the file system dynamically.
      * This creates directories as required as new types are added to the
@@ -812,7 +812,7 @@
        	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PROTECTED,
 				     FacilityCode.FAC_OBJECT_STORE, "FileSystemStore.createHierarchy("+path+")");
 	}
-	
+
 	if ((path != null) && (path.length() > 0))
 	{
 	    File f = null;
@@ -821,7 +821,7 @@
 	     * Is string a complete directory list, or is it an
 	     * absolute file name?
 	     */
-	    
+
 	    if (path.charAt(path.length() -1) != File.separatorChar)
 	    {
 		int index = path.lastIndexOf(File.separator);
@@ -847,7 +847,7 @@
 		    if (!f.mkdirs())
 		    {
 			retryLimit--;
-			
+
 			if (retryLimit == 0)
 			    return false;
 
@@ -888,7 +888,7 @@
 	    if (FileSystemStore.fileCache.get(path) != null)
 		return true;
 	}
-	
+
 	/*
 	 * If here then we need to check the file system. If there, we will
 	 * put it into the cache (if appropriate).
@@ -899,7 +899,7 @@
 
 	if (doesExist)
 	    addToCache(path);
-	
+
 	return doesExist;
     }
 
@@ -915,7 +915,7 @@
     {
 	removeFromCache(fname, true);
     }
-    
+
     /**
      * Print a warning if the file to be removed is not in the cache.
      *
@@ -944,10 +944,10 @@
 	    if (list[i].equals(id))
 		return true;
 	}
-	
+
 	return false;
     }
-    
+
     static final char unixSeparator = '/';
 
     static boolean rewriteSeparator = false;
@@ -955,7 +955,7 @@
     // allow derived classes to specify sync on a per instance basis
 
     protected boolean syncWrites = true;
-    
+
     private String  fullStoreName;
     private String  localStoreRoot;
     private boolean isValid;
@@ -997,19 +997,19 @@
 	    try
 	    {
 		Integer i = new Integer(retry);
-		
+
 		createRetry = i.intValue();
-	    
+
 		if (createRetry < 0)
 		    createRetry = 100;
 	    }
 	    catch (NumberFormatException e)
 	    {
-		throw new com.arjuna.ats.arjuna.exceptions.FatalError("Invalid retry for hierarchy creation: "+createRetry);
+		throw new com.arjuna.ats.arjuna.exceptions.FatalError("Invalid retry for hierarchy creation: "+createRetry, e);
 	    }
 	    catch (Exception e)
 	    {
-		throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString());
+		throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString(), e);
 	    }
 	}
 
@@ -1020,23 +1020,23 @@
 	    try
 	    {
 		Integer i = new Integer(timeout);
-		
+
 		createTimeout = i.intValue();
-	    
+
 		if (createTimeout < 0)
 		    createTimeout = 100;
 	    }
 	    catch (NumberFormatException e)
 	    {
-		throw new com.arjuna.ats.arjuna.exceptions.FatalError("Invalid timeout for hierarchy creation: "+createTimeout);
+		throw new com.arjuna.ats.arjuna.exceptions.FatalError("Invalid timeout for hierarchy creation: "+createTimeout, e);
 	    }
 	    catch (Exception e)
 	    {
-		throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString());
+		throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString(), e);
 	    }
 	}
     }
-    
+
     private static boolean isWindows = Utility.isWindows();
 
 }

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	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/HashedActionStore.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -24,7 +24,7 @@
  * Arjuna Solutions Limited,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: HashedActionStore.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -94,7 +94,7 @@
      * Have to return as a ShadowingStore because of
      * inheritence.
      */
-    
+
 public static ShadowingStore create ()
     {
 	return new HashedActionStore("");
@@ -112,7 +112,7 @@
 	String location = (String) param[0];
 	Integer shareStatus = (Integer) param[1];
 	int ss = ObjectStore.OS_UNSHARED;
-	
+
 	if (shareStatus != null)
 	{
 	    try
@@ -157,7 +157,7 @@
 	if (tsLogger.arjLogger.debugAllowed())
 	{
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PROTECTED,
-				     FacilityCode.FAC_OBJECT_STORE, 
+				     FacilityCode.FAC_OBJECT_STORE,
 				     "HashedStore.HashedActionStore( "+shareStatus+" )");
 	}
     }
@@ -166,7 +166,7 @@
     {
 	this(locationOfStore, ObjectStore.OS_UNSHARED);
     }
-    
+
 protected HashedActionStore (String locationOfStore, int shareStatus)
     {
 	super(shareStatus);
@@ -174,10 +174,10 @@
 	if (tsLogger.arjLogger.debugAllowed())
 	{
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PROTECTED,
-				     FacilityCode.FAC_OBJECT_STORE, 
+				     FacilityCode.FAC_OBJECT_STORE,
 				     "HashedStore.HashedActionStore("+locationOfStore+")");
 	}
-	
+
 	try
 	{
 	    setupStore(locationOfStore);
@@ -186,20 +186,20 @@
 	{
 	    tsLogger.arjLogger.warn(e.getMessage());
 
-	    throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString());
+	    throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString(), e);
 	}
     }
 
 protected HashedActionStore (ObjectName objName)
     {
 	super(objName);
-   
+
 	if (tsLogger.arjLogger.debugAllowed())
 	{
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PROTECTED,
 				     FacilityCode.FAC_OBJECT_STORE, "HashedStore.HashedActionStore( "+objName+")");
 	}
-	
+
 	try
 	{
 	    setupStore("");
@@ -208,7 +208,7 @@
 	{
 	    tsLogger.arjLogger.warn(e.getMessage());
 
-	    throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString());
+	    throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString(), e);
 	}
     }
 
@@ -233,7 +233,7 @@
 
 	return super.setupStore(location);
     }
-    
+
     private static boolean checkSync = false;
 
 }

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	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/HashedStore.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -156,7 +156,7 @@
 	if (tsLogger.arjLogger.debugAllowed())
 	{
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
-				     FacilityCode.FAC_OBJECT_STORE, 
+				     FacilityCode.FAC_OBJECT_STORE,
 				     "HashedStore.allObjUids("+tName+", "+state+", "+match+")");
 	}
 
@@ -191,7 +191,7 @@
 		    if (dir.isDirectory())
 		    {
 			String[] dirEnt = dir.list();
-    
+
 			for (int j = 0; j < dirEnt.length; j++)
 			{
 			    try
@@ -224,7 +224,7 @@
 			    }
 			    catch (IOException e)
 			    {
-				throw new ObjectStoreException(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.objectstore.HashedStore_5"));
+				throw new ObjectStoreException(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.objectstore.HashedStore_5"), e);
 			    }
 			}
 		    }
@@ -244,7 +244,7 @@
 	}
 	catch (IOException e)
 	{
-	    throw new ObjectStoreException(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.objectstore.HashedStore_6"));
+	    throw new ObjectStoreException(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.objectstore.HashedStore_6"), e);
 	}
 
 	state.setBuffer(store.buffer());
@@ -288,7 +288,7 @@
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PROTECTED,
 				     FacilityCode.FAC_OBJECT_STORE, "HashedStore.HashedStore("+locationOfStore+")");
 	}
-	
+
 	try
 	{
 	    setupStore(locationOfStore);
@@ -304,13 +304,13 @@
     protected HashedStore (ObjectName objName)
     {
 	super(objName);
-	
+
 	if (tsLogger.arjLogger.debugAllowed())
 	{
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PROTECTED,
 				     FacilityCode.FAC_OBJECT_STORE, "HashedStore.HashedStore("+objName+")");
 	}
-	
+
 	try
 	{
 	    setupStore("");
@@ -319,7 +319,7 @@
 	{
 	    tsLogger.arjLogger.warn(e.getMessage());
 
-	    throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString());
+	    throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString(), e);
 	}
     }
 
@@ -331,14 +331,14 @@
 	if (lastIndex != -1)
 	{
 	    int nextIndex = value.lastIndexOf(HashedStore.HASH_SEPARATOR, lastIndex - 1);
-	    
+
 	    if (nextIndex != -1)
 	    {
 		char[] bitInbetween = new char[lastIndex - nextIndex - 1];
 		boolean isDigit = true;
-		
+
 		value.getChars(nextIndex + 1, lastIndex, bitInbetween, 0);
-		
+
 		for (int i = 0; (i < bitInbetween.length) && isDigit; i++)
 		{
 		    if (!Character.isDigit(bitInbetween[i]))
@@ -354,18 +354,18 @@
 
 	return toReturn;
     }
-    
+
     /**
      * @return the file name for the state of the object
-     * identified by the Uid and TypeName. 
+     * identified by the Uid and TypeName.
      */
-    
+
     protected String genPathName (Uid objUid, String tName, int otype) throws ObjectStoreException
     {
 	if (tsLogger.arjLogger.debugAllowed())
 	{
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PROTECTED,
-				     FacilityCode.FAC_OBJECT_STORE, 
+				     FacilityCode.FAC_OBJECT_STORE,
 				     "HashedStore.genPathName("+objUid+", "+tName+", "+ObjectStore.stateTypeString(otype)+")");
 	}
 
@@ -428,13 +428,13 @@
 	    if (list[i].equals(id))
 		return true;
 	}
-	
+
 	return false;
     }
-    
+
     private static final int DEFAULT_NUMBER_DIRECTORIES = 255;
     private static final String HASH_SEPARATOR = "#";
-    
+
     private static int NUMBEROFDIRECTORIES = DEFAULT_NUMBER_DIRECTORIES;
 
     static
@@ -446,7 +446,7 @@
 	    try
 	    {
 		Integer i = new Integer(numberOfDirs);
-		
+
 		NUMBEROFDIRECTORIES = i.intValue();
 
 		if (NUMBEROFDIRECTORIES <= 0)
@@ -456,7 +456,7 @@
 			tsLogger.arjLoggerI18N.warn("com.arjuna.ats.internal.arjuna.objectstore.HashedStore_2",
 						    new Object[]{numberOfDirs});
 		    }
-		    
+
 		    NUMBEROFDIRECTORIES = DEFAULT_NUMBER_DIRECTORIES;
 		}
 	    }
@@ -467,8 +467,8 @@
 		    tsLogger.arjLoggerI18N.warn("com.arjuna.ats.internal.arjuna.objectstore.HashedStore_3",
 						new Object[]{numberOfDirs});
 		}
-		
-		throw new com.arjuna.ats.arjuna.exceptions.FatalError("Invalid hash directory number: "+numberOfDirs);
+
+		throw new com.arjuna.ats.arjuna.exceptions.FatalError("Invalid hash directory number: "+numberOfDirs, e);
 	    }
 	    catch (Exception e)
 	    {
@@ -477,8 +477,8 @@
 		    tsLogger.arjLoggerI18N.warn("com.arjuna.ats.internal.arjuna.objectstore.HashedStore_4",
 						new Object[]{e});
 		}
-		
-		throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString());
+
+		throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString(), e);
 	    }
 	}
     }

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	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/JDBCImple.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -136,7 +136,7 @@
 				}
 				else
 				{
-					throw new ObjectStoreException(e.toString());
+					throw new ObjectStoreException(e.toString(), e);
 				}
 			}
 			finally
@@ -236,7 +236,7 @@
 				}
 				else
 				{
-					throw new ObjectStoreException(e.toString());
+					throw new ObjectStoreException(e.toString(), e);
 				}
 			}
 			finally
@@ -335,7 +335,7 @@
 				}
 				else
 				{
-					throw new ObjectStoreException(e.toString());
+					throw new ObjectStoreException(e.toString(), e);
 				}
 			}
 			finally
@@ -356,7 +356,7 @@
 	 * currentState - determine the current state of an object. State search is
 	 * ordered OS_UNCOMMITTED, OS_UNCOMMITTED_HIDDEN, OS_COMMITTED,
 	 * OS_COMMITTED_HIDDEN
-	 * 
+	 *
 	 * @message com.arjuna.ats.internal.arjuna.objectstore.JDBCImple_3
 	 *          [com.arjuna.ats.internal.arjuna.objectstore.JDBCImple_3] -
 	 *          currentState caught exception: {0}
@@ -490,7 +490,7 @@
 	/**
 	 * allObjUids - Given a type name, return an ObjectState that contains all
 	 * of the uids of objects of that type.
-	 * 
+	 *
 	 * @message com.arjuna.ats.internal.arjuna.objectstore.JDBCImple_4
 	 *          [com.arjuna.ats.internal.arjuna.objectstore.JDBCImple_4] -
 	 *          allObjUids caught exception: {0}
@@ -589,8 +589,7 @@
 			}
 			catch (IOException e)
 			{
-				throw new ObjectStoreException(
-						"allObjUids - could not pack end of list Uid.");
+				throw new ObjectStoreException("allObjUids - could not pack end of list Uid.", e);
 			}
 
 			state.setBuffer(store.buffer());
@@ -716,7 +715,7 @@
 			}
 			catch (IOException e)
 			{
-				throw new ObjectStoreException(tsLogger.arjLoggerI18N.getString("com.arjuna.ats.internal.arjuna.objectstore.packProblem"));
+				throw new ObjectStoreException(tsLogger.arjLoggerI18N.getString("com.arjuna.ats.internal.arjuna.objectstore.packProblem"), e);
 			}
 
 			foundTypes.setBuffer(store.buffer());
@@ -856,7 +855,7 @@
 
 	/**
 	 * Set up the store for use.
-	 * 
+	 *
 	 * @message com.arjuna.ats.internal.arjuna.objectstore.JDBCImple_11
 	 *          [com.arjuna.ats.internal.arjuna.objectstore.JDBCImple_11] -
 	 *          invalid initial pool size: {0}
@@ -1036,7 +1035,7 @@
 
 	/**
 	 * Add a new table to an existing implementation.
-	 * 
+	 *
 	 */
 	protected void addTable(String tableName) throws Exception
 	{
@@ -1115,7 +1114,7 @@
 
 	/**
 	 * Print a warning if the file to be removed is not in the cache.
-	 * 
+	 *
 	 * @message com.arjuna.ats.internal.arjuna.objectstore.JDBCImple_15
 	 *          [com.arjuna.ats.internal.arjuna.objectstore.JDBCImple_15] -
 	 *          removeFromCache - no entry for {0}
@@ -1147,7 +1146,7 @@
 	 * retryConnection. Called in exeption handlers where the problem may be due
 	 * to use of a stale (broken) cached connection. If this is the case, we
 	 * re-establish the connection before returning.
-	 * 
+	 *
 	 * @param e
 	 *            The exception, which may be due to a bad connection.
 	 * @param pool
@@ -1225,7 +1224,7 @@
 	 * Allocate a database connection from the pool: Walks the array and
 	 * allocates the first available connection. If non are free, waits before
 	 * trying again.
-	 * 
+	 *
 	 * @message com.arjuna.ats.internal.arjuna.objectstore.JDBCImple_16
 	 *          [com.arjuna.ats.internal.arjuna.objectstore.JDBCImple_16] -
 	 *          getPool caught exception: {0}
@@ -1299,7 +1298,7 @@
 
 	/**
 	 * return a connection to the free pool, optionally closing it.
-	 * 
+	 *
 	 * @message com.arjuna.ats.internal.arjuna.objectstore.JDBCImple_18
 	 *          [com.arjuna.ats.internal.arjuna.objectstore.JDBCImple_18] -
 	 *          freePool - freeing a connection which is already free!

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	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/JDBCStore.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -24,7 +24,7 @@
  * Arjuna Solutions Limited,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: JDBCStore.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -62,10 +62,10 @@
 /**
  * An object store implementation which uses a JDBC database for maintaining
  * object states. All states are maintained within a single table.
- * 
+ *
  * It is assumed that only one object will use a given instance of the
  * JDBCStore. Hence, there is no need for synchronizations.
- * 
+ *
  * @message com.arjuna.ats.internal.arjuna.objectstore.JDBCStore_1
  *          [com.arjuna.ats.internal.arjuna.objectstore.JDBCStore_1] - JDBCStore
  *          could not setup store < {0} , {1} >
@@ -401,7 +401,7 @@
 		}
 		catch (Exception e)
 		{
-			throw new ObjectStoreError();
+			throw new ObjectStoreError(e.toString(), e);
 		}
 	}
 
@@ -420,7 +420,7 @@
 		}
 		catch (Exception e)
 		{
-			throw new ObjectStoreError();
+			throw new ObjectStoreError(e.toString(), e);
 		}
 	}
 
@@ -439,13 +439,13 @@
 		}
 		catch (Exception e)
 		{
-			throw new ObjectStoreError();
+			throw new ObjectStoreError(e.toString(), e);
 		}
 	}
 
 	/**
 	 * Get the JDBC access class name.
-	 * 
+	 *
 	 * @return The access class name.
 	 */
 	protected String getAccessClassName()
@@ -458,7 +458,7 @@
 
 	/**
 	 * Set the JDBC access class name.
-	 * 
+	 *
 	 * @param The
 	 *            access class name.
 	 */
@@ -469,7 +469,7 @@
 
 	/**
 	 * Get the JDBC default table name.
-	 * 
+	 *
 	 * @return The default table name.
 	 */
 	protected String getDefaultTableName()
@@ -479,7 +479,7 @@
 
 	/**
 	 * Get the JDBC access class name from an object.
-	 * 
+	 *
 	 * @param The
 	 *            object name.
 	 * @return The access class name.
@@ -492,7 +492,7 @@
 
 	/**
 	 * Get the JDBC table name from an object.
-	 * 
+	 *
 	 * @param The
 	 *            object name.
 	 * @return The table name.
@@ -506,7 +506,7 @@
 
 	/**
 	 * Get the JDBC access class.
-	 * 
+	 *
 	 * @return The jdbc access variable.
 	 */
 	protected JDBCAccess getJDBCAccess()
@@ -516,7 +516,7 @@
 
 	/**
 	 * Set the JDBC access class.
-	 * 
+	 *
 	 * @param jdbcAccess
 	 *            The jdbc access variable.
 	 */
@@ -527,7 +527,7 @@
 
 	/**
 	 * Get the JDBC table name.
-	 * 
+	 *
 	 * @return The table name.
 	 */
 	protected String getTableName()
@@ -537,7 +537,7 @@
 
 	/**
 	 * Set the JDBC table name.
-	 * 
+	 *
 	 * @param tableName
 	 *            The table name.
 	 */
@@ -818,7 +818,7 @@
 	 * Attempt to load the database class. &nbsp;This method searches for a
 	 * class called <name>_<major>_<minor>, then <name>_<major> and finally
 	 * <dbName>
-	 * 
+	 *
 	 * @param conn
 	 *            A database connection.
 	 * @return The database class.

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	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/LogStore.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -4,7 +4,7 @@
  * Arjuna Solutions Limited,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: LogStore.java,v 1.4 2004/11/11 12:22:21 nmcl Exp $
  */
@@ -49,13 +49,13 @@
  * updates occur only in the case of failures, which hopefully are rare; hence
  * the reason we optimise for the non-failure case. This does mean that recovery
  * may take longer than when using other log implementations.
- * 
+ *
  * There are several implementations of this approach, some of which perform better
  * on one operating system than another. We may put them in to the source eventually
  * and make it clear for which OS combination they are best suited. However, this
  * implementation works well on all operating systems we have tested so is a good
  * default.
- * 
+ *
  * @author Mark Little (mark at arjuna.com)
  * @version $Id: LogStore.java,v 1.4 2004/11/11 12:22:21 nmcl Exp $
  * @since JTS 1.0.
@@ -76,45 +76,45 @@
  * termination record. Obviously if a crash occurs, then no such record will
  * have been written and in which case, the recovery manager determines that the
  * log is no longer required via timeout heuristics.
- * 
+ *
  * The implementation normally writes removal records to the end of the log
  * when an entry is deleted. This can be disabled and in which case we end up in
  * the same situation as if a failure occurred as the removal record was being written
  * or a crash happened before remove_committed could succeed on any of the other
  * file-based object store implementations: we potentially try to commit transactions
  * that have terminated (either committed or rolled back). In which case we ...
- * 
+ *
  * (i) call commit on a state that has already been committed and fail to do so. Will
  * eventually move the log record elsewhere and the administrator can deal with it.
- * 
+ *
  * (ii) call commit on a state that has already been rolled back and again fail to do so.
  * Will eventually move the log record elsewhere as above.
- * 
+ *
  * If we do not write removal records then we would end up in a situation of trying to
  * commit every log instance multiple times. As such we always try to write records but
  * do them either synchronously or asynchronously (periodically). Of course there's still
  * the chance that a failure will cause problems in both sync and async cases, but we
  * have reduced the probability as well as the number of such problem items. The periodicity
  * of this is the same as pruning the log, i.e., the same thread does both jobs.
- * 
+ *
  * By default we synchronously add the removal marker to the log, i.e., when remove_committed
  * returns, the marker entry has been appended to the log.
- * 
+ *
  * NOTE: there is a race where we terminate the log instance and yet transactions may
  * still be using it. This happens with other object store implementations too. However, in
  * this case we could end up with a log that should be deleted because all of the entries
  * have gone. We try to fix this up through allObjUids. If recovery works correctly then
  * these states will eventually get deleted.
- * 
+ *
  * TODO
- * 
+ *
  * When truncating logs we write a shadow and then overwrite the original with the shadow
  * when finished. If there is a crash we could end up with the shadow as well as the
  * original. Recovery could tidy this up for us - as long as we have the original then
  * we can continue to recover - the shadow instance may be corrupted so best to ignore
  * it and simply delete it. But we would need to ensure that we didn't delete a shadow that
  * is actually still active.
- * 
+ *
  * Also we do not use a primary and backup log approach. Whenever we need a new log instance we
  * create one. This means that there could be many logs being used at the same time, which could
  * be a problem for disk space (unlikely these days, but possible). If this approach gets to
@@ -123,13 +123,13 @@
 
 /**
  * Represents a specific log instance.
- * 
+ *
  * @author mlittle
  *
  */
 
 class LogInstance
-{	
+{
 	public class TransactionData
 	{
 		TransactionData (final Uid tx, final long off, final LogInstance parent)
@@ -138,12 +138,12 @@
 			offset = off;
 			container = parent;
 		}
-		
+
 		public final Uid txId;
 		public final long offset;
 		public final LogInstance container;
 	}
-	
+
 	public LogInstance(String tn, long size)
 	{
 		_logName = new Uid();
@@ -155,7 +155,7 @@
 	/*
 	 * Once frozen we will not use the log again except for recovery and
 	 * pruning.
-	 * 
+	 *
 	 * We could consider another algorithm that reuses the log once it has
 	 * dropped below a threshold size. Probably not worth it at the moment.
 	 */
@@ -184,21 +184,21 @@
 	{
 		return _typeName;
 	}
-	
+
 	public final InputObjectState allObjUids () throws ObjectStoreException
 	{
 		OutputObjectState state = new OutputObjectState();
 		Iterator<Uid> iter = _ids.keySet().iterator();
-		
+
 		try
 		{
 			while (iter.hasNext())
 			{
 				iter.next().pack(state);
 			}
-			
+
 			// don't forget to null terminate
-			
+
 			Uid.nullUid().pack(state);
 		}
 		catch (final IOException ex)
@@ -208,33 +208,33 @@
 
 		return new InputObjectState(state);
 	}
-	
+
 	public final boolean present(Uid id)
 	{
 		return _ids.containsKey(id);
 	}
-	
+
 	public final TransactionData getTxId (Uid txId)
 	{
 		return new TransactionData(txId, _used, this);
 	}
-	
+
 	public final TransactionData addTxId (Uid txId, long size)
 	{
 		TransactionData td = new TransactionData(txId, _used, this);
-		
+
 		_transactions.add(td);  // allow multiple entries in the same log
 		_ids.put(txId, txId);
 		_used += size;
-		
+
 		return td;
 	}
-	
+
 	public final long remaining()
 	{
 		return _totalSize - _used;
 	}
-	
+
 	public final void resize (long size)
 	{
 		_totalSize = size;
@@ -263,7 +263,7 @@
 class LogPurger extends Thread
 {
 	private enum Status {ACTIVE, PASSIVE, TERMINATED};
-	
+
 	class LogElement
 	{
 		public LogElement(final String t, final Uid u, final int s)
@@ -280,10 +280,10 @@
 
 	/*
 	 * Purge every N seconds.
-	 * 
+	 *
 	 * TODO purge after number of logs > M
 	 */
-	
+
 	public static final long DEFAULT_PURGE_TIME = 100000; // 100 seconds
 
 	public LogPurger(LogStore instance)
@@ -348,7 +348,7 @@
 	 * Poke the thread into doing some work even if it normally
 	 * would not.
 	 */
-	
+
 	public void trigger ()
 	{
 		synchronized (_lock)
@@ -357,19 +357,19 @@
 				_lock.notify();
 		}
 	}
-	
+
 	public void run()
 	{
 		for (;;)
 		{
 			// TODO activate thread during read and get it to write deleted states
-			
+
 			try
 			{
 				synchronized (_lock)
 				{
 					_status = Status.PASSIVE;
-					
+
 					_lock.wait(_purgeTime);
 				}
 			}
@@ -377,19 +377,19 @@
 			{
 				_status = Status.ACTIVE;
 			}
-			
+
 			/*
 			 * Write any asynchronous delete records.
 			 */
-			
+
 			System.err.println("**THREAD RUNNING");
-			
+
 			writeRemovalEntries();
 
 			/*
 			 * Now truncate any logs we've been working on.
 			 */
-			
+
 			try
 			{
 				_objStore.truncateLogs();
@@ -398,7 +398,7 @@
 			{
 			}
 		}
-		
+
 		// _status = Status.TERMINATED;
 	}
 
@@ -453,20 +453,20 @@
 			throws ObjectStoreException
 	{
 		InputObjectState ios = new InputObjectState();
-		
+
 		/*
 		 * TODO
-		 * 
+		 *
 		 * It's possible that the entry has been marked to be deleted but
 		 * that the removal entry hasn't been written yet. We could check the
 		 * async cache. However, since we really only care about this during
 		 * recovery, it's not going to cause us  problems anyway.
 		 */
-		
+
 		if (allObjUids(tName, ios, ObjectStore.OS_UNKNOWN))
 		{
 			Uid tempUid = new Uid(Uid.nullUid());
-			
+
 			do
 			{
 				try
@@ -476,15 +476,15 @@
 				catch (final Exception ex)
 				{
 					ex.printStackTrace();
-					
+
 					return ObjectStore.OS_UNKNOWN;
 				}
-				
+
 				if (tempUid.equals(objUid))
 					return ObjectStore.OS_COMMITTED;
-				
+
 			} while (tempUid.notEquals(Uid.nullUid()));
-			
+
 			return ObjectStore.OS_UNKNOWN;
 		}
 		else
@@ -595,7 +595,7 @@
 	{
 		return super.allObjUids(tName, state, match);
 	}
-	
+
 	/**
 	 * This is a recovery-only method and should not be called during normal
 	 * execution. As such we need to load in all of the logs we can find that
@@ -611,25 +611,25 @@
 		 */
 
 		// in case of asynchronous removals trigger the purger now.
-		
+
 		_purger.trigger();
-		
+
 		/*
 		 * Get a list of logs. Load them in to memory if we aren't already
 		 * working on them/it. But we can prune the entry once we're
 		 * finished or the memory footprint will grow. We should do this
 		 * for all frozen entries eventually too.
 		 */
-		
+
 		InputObjectState logs = new InputObjectState();
 		OutputObjectState objUids = new OutputObjectState();
-		
+
 		/*
 		 * We never call this method except during recovery. As such we shouldn't
 		 * need to worry about optimizations such as checking whether or not the
 		 * log is in current working memory.
 		 */
-		
+
 		if (!super.allObjUids(tName, logs, match))
 			return false;
 		else
@@ -638,31 +638,31 @@
 			 * Now we have all of the log names let's attach to each one
 			 * and locate the committed instances (not deleted.)
 			 */
-			
+
 			Uid logName = new Uid(Uid.nullUid());
-			
+
 			try
 			{
 				do
 				{
 					logName.unpack(logs);
-					
+
 					if (logName.notEquals(Uid.nullUid()))
 					{
 						/*
 						 * Could check to see if log is in current working memory.
 						 */
-						
+
 						/*
 						 * TODO
-						 * 
+						 *
 						 * First purge the log if we can, but we need to know that
 						 * we're not playing with an instance that is being manipulated
 						 * from another VM instance.
 						 */
-						
+
 						ArrayList<InputObjectState> txs = scanLog(logName, tName);
-	
+
 						if (txs.size() > 0)
 						{
 							for (int i = 0; i < txs.size(); i++)
@@ -672,20 +672,20 @@
 						}
 					}
 				} while (logName.notEquals(Uid.nullUid()));
-				
+
 				// remember null terminator
-				
+
 				Uid.nullUid().pack(objUids);
-				
+
 				state.setBuffer(objUids.buffer());
 			}
 			catch (final IOException ex)
 			{
 				ex.printStackTrace();
-				
+
 				return false;
 			}
-			
+
 			return true;
 		}
 	}
@@ -778,7 +778,7 @@
 
 			super.makeInvalid();
 
-			throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString());
+			throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString(), e);
 		}
 	}
 
@@ -866,7 +866,7 @@
 	 * the ObjectState. If the second argument is SHADOW, then the file name is
 	 * different so that a subsequent commit_state invocation will rename the
 	 * file.
-	 * 
+	 *
 	 * We need to make sure that each entry is written to the next empty location
 	 * in the log even if there's already an entry for this tx.
 	 */
@@ -888,7 +888,7 @@
 
 		String fname = null;
 		File fd = null;
-		
+
 		if (tName != null)
 		{
 			int imageSize = (int) state.length();
@@ -901,7 +901,7 @@
 			{
 				TransactionData theLogEntry = getLogName(objUid, tName, buffSize);		// always adds entry to log
 				LogInstance theLog = theLogEntry.container;
-			
+
 				if (theLog == null)
 					throw new ObjectStoreException();
 
@@ -926,13 +926,13 @@
 				try
 				{
 					ofile = new RandomAccessFile(fd, FILE_MODE);
-					
+
 					if (setLength)
 					{
 						ofile.setLength(_maxFileSize);
 					}
 					else
-					{					
+					{
 						// may have to resize file if we keep updating this transaction info
 
 						if (theLog.remaining() < buffSize)
@@ -966,7 +966,7 @@
 
 					throw new ObjectStoreException(
 							"ShadowingStore::write_state() - write failed to sync for "
-							+ fname);
+							+ fname, e);
 				}
 				catch (FileNotFoundException e)
 				{
@@ -976,7 +976,7 @@
 
 					throw new ObjectStoreException(
 							"ShadowingStore::write_state() - write failed to locate file "
-							+ fname + ": " + e);
+							+ fname + ": " + e, e);
 				}
 				catch (IOException e)
 				{
@@ -986,7 +986,7 @@
 
 					throw new ObjectStoreException(
 							"ShadowingStore::write_state() - write failed for "
-							+ fname + ": " + e);
+							+ fname + ": " + e, e);
 				}
 				finally
 				{
@@ -1001,7 +1001,7 @@
 					}
 				}
 			}
-			
+
 			if (!unlockAndClose(fd, ofile))
 			{
 				if (tsLogger.arjLoggerI18N.isWarnEnabled())
@@ -1038,9 +1038,9 @@
 		 * thread to flush its cache now. Try to avoid false positives during
 		 * recovery wherever possible!
 		 */
-		
+
 		_purger.trigger();
-		
+
 		/*
 		 * It's possible that recovery got hold of a state id while it was
 		 * being deleted (marker written and pruning thread not yet active).
@@ -1049,14 +1049,14 @@
 		 * a read on a state that is about to be deleted. Recovery should be
 		 * able to cope with these edge cases.
 		 */
-		
+
 		TransactionData td = getLogName(u, tn, -1);
-		
+
 		if (td == null)
 			throw new ObjectStoreException();
-		
+
 		ArrayList<InputObjectState> states = scanLog(td.container.getName(), tn);
-		
+
 		if ((states == null) || (states.size() == 0))
 			return null;
 
@@ -1065,11 +1065,11 @@
 			if (states.get(i).stateUid().equals(u))
 				return states.get(i);
 		}
-		
+
 		/*
 		 * Not in the log, so probably removed by now.
 		 */
-		
+
 		return null;
 	}
 
@@ -1099,13 +1099,13 @@
 			 * data item then we cannot ensure that they will go into the same
 			 * log with a pre-set size for the log. Therefore, we have two
 			 * options:
-			 * 
+			 *
 			 * (i) find the old entry in the log and mark it as deleted.
 			 * (ii) increase the size of the log to accommodate the removal entry.
-			 * 
+			 *
 			 * We currently go for option (ii) as this is the quickest.
 			 */
-			
+
 			if (_synchronousRemoval)
 			{
 				OutputObjectState removalState = new OutputObjectState(u, tn);
@@ -1120,7 +1120,7 @@
 		}
 		catch (IOException ex)
 		{
-			throw new ObjectStoreException(ex.toString());
+			throw new ObjectStoreException(ex.toString(), ex);
 		}
 		finally
 		{
@@ -1157,13 +1157,13 @@
 			OutputObjectState removalState = new OutputObjectState(u, tn);
 
 			removalState.packBytes(_removedState);
-			
+
 			if (!write_state(u, tn, removalState, s))
 				throw new ObjectStoreException();
 		}
 		catch (IOException ex)
 		{
-			throw new ObjectStoreException(ex.toString());
+			throw new ObjectStoreException(ex.toString(), ex);
 		}
 
 		return true;
@@ -1173,13 +1173,13 @@
 	{
 		return truncateLogs(false);
 	}
-	
+
 	boolean truncateLogs (boolean force) throws ObjectStoreException
 	{
 		synchronized (_logNames)
 		{
 			Iterator<LogInstance> iter = _logNames.iterator();
-			
+
 			/*
 			 * Only do this for logs that are full to save time,
 			 * except if we are terminating.
@@ -1189,7 +1189,7 @@
 			{
 				boolean delete = false;
 				LogInstance log = null;
-				
+
 				try
 				{
 					log = iter.next();
@@ -1201,7 +1201,7 @@
 				{
 					// TODO log
 				}
-				
+
 				if (delete)
 					iter.remove();
 			}
@@ -1213,11 +1213,11 @@
 	/*
 	 * Return true if the log needs to be deleted.
 	 */
-	
+
 	private final boolean truncateLog(final LogInstance log, boolean force) throws ObjectStoreException
 	{
 		boolean delete = false;
-		
+
 		synchronized (_lock)
 		{
 			File fd = new File(genPathName(log.getName(), log.getTypeName(), ObjectStore.OS_COMMITTED));
@@ -1236,7 +1236,7 @@
 				 * atomically! If the list is empty then delete the
 				 * file!
 				 */
-				
+
 				if ((objectStates != null) && (objectStates.size() > 0))
 				{
 					/*
@@ -1245,12 +1245,12 @@
 					 * will not use it again within another VM except for
 					 * recovery purposes.
 					 */
-					
+
 					String fname = genPathName(log.getName(), log.getTypeName(), ObjectStore.OS_UNCOMMITTED);
 					File fd2 = openAndLock(fname, FileLock.F_WRLCK, true);
 					RandomAccessFile oFile = new RandomAccessFile(fd2, FILE_MODE);
 					int size = 0;
-					
+
 					oFile.setLength(_maxFileSize);
 
 					for (int i = 0; i < objectStates.size(); i++)
@@ -1272,14 +1272,14 @@
 						catch (final Exception ex)
 						{
 							ex.printStackTrace();
-							
+
 							// TODO log
 
 							fd2.delete();
 
 							unlockAndClose(fd2, oFile);
-							
-							throw new ObjectStoreException(ex.toString());
+
+							throw new ObjectStoreException(ex.toString(), ex);
 						}
 					}
 
@@ -1288,7 +1288,7 @@
 						if (force)
 						{
 							oFile.setLength(size);
-						
+
 							log.freeze();
 						}
 
@@ -1297,10 +1297,10 @@
 					catch (final Exception ex)
 					{
 						ex.printStackTrace();
-						
+
 						// TODO log
 
-						throw new ObjectStoreException(ex.toString());
+						throw new ObjectStoreException(ex.toString(), ex);
 					}
 					finally
 					{
@@ -1317,11 +1317,11 @@
 					 */
 
 					fd.delete();
-					
+
 					/*
 					 * Remember to remove the information from the memory cache.
 					 */
-					
+
 					delete = true;
 				}
 			}
@@ -1335,10 +1335,10 @@
 			{
 				ex.printStackTrace();
 
-				throw new ObjectStoreException(ex.toString());
+				throw new ObjectStoreException(ex.toString(), ex);
 			}
 		}
-		
+
 		return delete;
 	}
 
@@ -1347,7 +1347,7 @@
 		/*
 		 * Make sure no new entries can be created while we scan.
 		 */
-		
+
 		synchronized (_lock)
 		{
 			try
@@ -1366,19 +1366,19 @@
 					ArrayList<InputObjectState> objectStates = new ArrayList<InputObjectState>();
 
 					iFile.seek(0); // make sure we're at the start
-					
+
 					while (iFile.getFilePointer() < iFile.length())
 					{
 						byte[] buff = new byte[_redzone.length];
 
 						iFile.read(buff);
-						
+
 						if (!redzoneProtected(buff))
 						{
 							// end
-							
+
 							break;
-							
+
 							/*
 							 * TODO add an end-of-log entry and check for that. Currently just assume
 							 * that no RZ means end, rather than corruption.
@@ -1390,13 +1390,13 @@
 							byte[] uidString = new byte[uidSize];
 
 							iFile.read(uidString);
-							
+
 							Uid txId = new Uid(new String(uidString));
 							int imageSize = iFile.readInt();
 							byte[] imageState = new byte[imageSize];
 
 							iFile.read(imageState);
-							
+
 							try
 							{
 								InputObjectState state = new InputObjectState(
@@ -1408,7 +1408,7 @@
 							{
 								ex.printStackTrace();
 
-								throw new ObjectStoreException(ex.toString());
+								throw new ObjectStoreException(ex.toString(), ex);
 							}
 						}
 					}
@@ -1456,7 +1456,7 @@
 						/*
 						 * make sure we remove them from the first list to save time.
 						 */
-						
+
 						objectStates.removeAll(deletedLogs);
 
 						deleteEntries(objectStates, deletedLogs);
@@ -1472,7 +1472,7 @@
 						/*
 						 * Now return the list of committed entries.
 						 */
-						
+
 						return objectStates;
 					}
 					else
@@ -1494,11 +1494,11 @@
 			{
 				ex.printStackTrace();
 
-				throw new ObjectStoreException(ex.toString());
+				throw new ObjectStoreException(ex.toString(), ex);
 			}
 		}
 	}
-	
+
 	private final boolean redzoneProtected(final byte[] buff)
 	{
 		for (int i = 0; i < _redzone.length; i++)
@@ -1554,10 +1554,10 @@
 	 * them. If a log size goes over the maximum allowed, then we swap all
 	 * threads to a new log with the exception of those that are currently using
 	 * the old log.
-	 * 
+	 *
 	 * We always add a new entry to the log even if one already exists.
-	 * 
-	 * Because normally we are writing to the log we pass in the size that we need to 
+	 *
+	 * Because normally we are writing to the log we pass in the size that we need to
 	 * accommodate. However, during recovery we need to read the state yet still
 	 * need the log name. So if we pass a size of -1 this signifies only to
 	 * return the log data and not allocate space for a new instance.
@@ -1579,7 +1579,7 @@
              * where the log is modified but not deleted for a while, e.g., during
              * recovery.
              */
-            
+
             while (iter.hasNext())
             {
                 entry = (LogInstance) iter.next();
@@ -1592,20 +1592,20 @@
                 		return entry.addTxId(txid, size);
                 }
             }
-            
+
             /*
              * If we get here then this TxId isn't in one of the
              * logs we are maintaining currently. So go back through
              * the list of logs and find one that is small enough
              * for us to use. The first one with room will do.
              */
-            
+
             iter = _logNames.iterator();
-            
+
             while (iter.hasNext())
             {
                 entry = (LogInstance) iter.next();
-                
+
                 if (!entry.isFrozen())
                 {
                 	if (entry.remaining() > size)
@@ -1616,14 +1616,14 @@
                     {
                     	/*
                     	 * TODO
-                    	 * 
+                    	 *
                     	 * When can we remove the information about this
                     	 * log from memory? If we do it too soon then it's possible
                     	 * that delete entries will not go into the right log. If we
                     	 * leave it too late then the memory footprint increases. Prune
                     	 * the entry when we prune the log from disk?
                     	 */
-                    	
+
                     	entry.freeze();
                     }
                 }
@@ -1678,7 +1678,7 @@
 	private static final byte[] _removedState = { 0xd, 0xe, 0xa, 0xd, 0xb, 0xe, 0xe, 0xf };
 
 	private static final char HIDDENCHAR = '~';
-	
+
 	static
 	{
 		try
@@ -1691,7 +1691,7 @@
 				_synchronousRemoval = true;
 
 			String purgeTime = arjPropertyManager.propertyManager.getProperty(Environment.TRANSACTION_LOG_PURGE_TIME);
-			
+
 			if (purgeTime != null)
 			{
 				try
@@ -1703,7 +1703,7 @@
 					ex.printStackTrace();
 				}
 			}
-			
+
 			String logSize = arjPropertyManager.propertyManager.getProperty(Environment.TRANSACTION_LOG_SIZE);
 
 			if (logSize != null)

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	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/NullActionStore.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -24,7 +24,7 @@
  * Arjuna Technologies Limited,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: NullActionStore.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -70,7 +70,7 @@
     {
 	return ObjectStoreType.NULL_ACTION;
     }
-    
+
     /**
      * @return current state of object. Assumes that genPathName allocates
      * enough extra space to allow extra chars to be added.
@@ -142,13 +142,13 @@
     public static ClassName name ()
     {
 	return ArjunaNames.Implementation_ObjectStore_NullActionStore();
-    }    
+    }
 
     /**
      * Have to return as a ShadowingStore because of
      * inheritence.
      */
-    
+
     public static ShadowingStore create ()
     {
 	return new NullActionStore("");
@@ -166,7 +166,7 @@
 	String location = (String) param[0];
 	Integer shareStatus = (Integer) param[1];
 	int ss = ObjectStore.OS_UNSHARED;
-	
+
 	if (shareStatus != null)
 	{
 	    try
@@ -183,7 +183,7 @@
 		}
 	    }
 	}
-	
+
 	return new NullActionStore(location, ss);
     }
 
@@ -194,7 +194,7 @@
 	else
 	    return new NullActionStore(param);
     }
-    
+
     protected NullActionStore (String locationOfStore)
     {
 	this(locationOfStore, ObjectStore.OS_UNSHARED);
@@ -214,8 +214,8 @@
 		tsLogger.arjLogger.warn(e.getMessage());
 
 	    super.makeInvalid();
-	    
-	    throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString());
+
+	    throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString(), e);
 	}
     }
 
@@ -223,7 +223,7 @@
     {
 	this(ObjectStore.OS_UNSHARED);
     }
-    
+
     protected NullActionStore (int shareStatus)
     {
 	super(shareStatus);
@@ -233,7 +233,7 @@
     {
 	super(objName);
     }
-    
+
     protected synchronized boolean setupStore (String location) throws ObjectStoreException
     {
 	return true;

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	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/ShadowingStore.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -24,7 +24,7 @@
  * Arjuna Solutions Limited,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: ShadowingStore.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -99,7 +99,7 @@
     {
 	return ObjectStoreType.SHADOWING;
     }
-    
+
     /**
      * @return current state of object. Assumes that genPathName allocates
      * enough extra space to allow extra chars to be added.
@@ -110,7 +110,7 @@
 public int currentState (Uid objUid, String tName) throws ObjectStoreException
     {
 	int theState = ObjectStore.OS_UNKNOWN;
-    
+
 	if (storeValid())
 	{
 	    String path = genPathName(objUid, tName, ObjectStore.OS_SHADOW);
@@ -150,8 +150,8 @@
 	if (tsLogger.arjLoggerI18N.debugAllowed())
 	{
 	    tsLogger.arjLoggerI18N.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
-					 FacilityCode.FAC_OBJECT_STORE, 
-					 "com.arjuna.ats.internal.arjuna.objectstore.ShadowingStore_22", 
+					 FacilityCode.FAC_OBJECT_STORE,
+					 "com.arjuna.ats.internal.arjuna.objectstore.ShadowingStore_22",
 					 new Object[]{objUid, tName, ObjectStore.stateStatusString(theState)});
 	}
 
@@ -171,7 +171,7 @@
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
 				     FacilityCode.FAC_OBJECT_STORE, "ShadowingStore.commit_state("+objUid+", "+tName+")");
 	}
-	
+
 	boolean result = false;
 
 	/* Bail out if the object store is not set up */
@@ -195,7 +195,7 @@
 	    {
 		shadow = genPathName(objUid, tName, ObjectStore.OS_SHADOW);
 		filename = genPathName(objUid, tName, ObjectStore.OS_ORIGINAL);
-	    
+
 		if (state == ObjectStore.OS_UNCOMMITTED_HIDDEN)
 		{
 		    /* maintain hidden status on rename */
@@ -229,7 +229,7 @@
 		    super.addToCache(filename);
 		    super.removeFromCache(shadow);
 		}
-		
+
 		shadowState = null;
 		originalState = null;
 	    }
@@ -255,7 +255,7 @@
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
 				     FacilityCode.FAC_OBJECT_STORE, "ShadowingStore.hide_state("+objUid+", "+tName+")");
 	}
-	
+
 	boolean hiddenOk = true;
 
 	/* Bail out if the object store is not set up */
@@ -265,7 +265,7 @@
 	    int state = currentState(objUid, tName);
 	    String path1 = null;
 	    String path2 = null;
-	    
+
 	    switch (state)
 	    {
 	    case ObjectStore.OS_UNCOMMITTED_HIDDEN:
@@ -295,7 +295,7 @@
 
 		    newState = null;
 		    oldState = null;
-		    
+
 		    break;
 		}
 	    case ObjectStore.OS_UNCOMMITTED:
@@ -322,7 +322,7 @@
 
 		    newState = null;
 		    oldState = null;
-		    
+
 		    break;
 		}
 	    default:
@@ -343,7 +343,7 @@
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
 				     FacilityCode.FAC_OBJECT_STORE, "ShadowingStore.reveal_state("+objUid+", "+tName+")");
 	}
-	
+
 	boolean revealedOk = true;
 
 	if (storeValid())
@@ -378,14 +378,14 @@
 
 		    newState = null;
 		    oldState = null;
-		    
+
 		    break;
 		}
 	    case ObjectStore.OS_COMMITTED_HIDDEN:
 		{
 		    path1 = genPathName(objUid, tName, ObjectStore.OS_ORIGINAL);
 		    path2 = new String(path1) + HIDDINGCHAR;
-		    
+
 		    File newState = new File(path2);
 		    File oldState = new File(path1);
 
@@ -405,7 +405,7 @@
 
 		    newState = null;
 		    oldState = null;
-		    
+
 		    break;
 		}
 	    case ObjectStore.OS_COMMITTED:
@@ -420,12 +420,12 @@
 
 	return revealedOk;
     }
-    
+
 public ClassName className ()
     {
 	return ArjunaNames.Implementation_ObjectStore_ShadowingStore();
     }
-    
+
 public static ClassName name ()
     {
 	return ArjunaNames.Implementation_ObjectStore_ShadowingStore();
@@ -444,7 +444,7 @@
 	String location = (String) param[0];
 	Integer shareStatus = (Integer) param[1];
 	int ss = ObjectStore.OS_UNSHARED;
-	
+
 	if (shareStatus != null)
 	{
 	    try
@@ -461,7 +461,7 @@
 		}
 	    }
 	}
-	
+
 	return new ShadowingStore(location, ss);
     }
 
@@ -488,7 +488,7 @@
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PROTECTED,
 				     FacilityCode.FAC_OBJECT_STORE, "ShadowingStore.genPathName("+objUid+", "+tName+", "+ObjectStore.stateTypeString(ft)+")");
 	}
-	
+
 	String fname = super.genPathName(objUid, tName, ft);
 
 	if (ft == ObjectStore.OS_SHADOW)
@@ -500,10 +500,10 @@
 protected String revealedId (String name)
     {
 	int index = name.indexOf(HIDDINGCHAR);
-	
+
 	if (index == -1)
 	    index = name.indexOf(SHADOWCHAR);
-	    
+
 	if (index != -1)
 	    return name.substring(0, index);
 	else
@@ -518,7 +518,7 @@
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PROTECTED,
 				     FacilityCode.FAC_OBJECT_STORE, "ShadowingStore.read_state("+objUid+", "+tName+", "+ObjectStore.stateTypeString(ft)+")");
 	}
-	
+
 	if (!storeValid())
 	{
 	    if (tsLogger.arjLoggerI18N.isWarnEnabled())
@@ -545,7 +545,7 @@
 		{
 		    return null;
 		}
-		
+
 		String fname = genPathName(objUid, tName, ft);
 		File fd = openAndLock(fname, FileLock.F_RDLCK, false);
 
@@ -562,8 +562,8 @@
 		    catch (FileNotFoundException e)
 		    {
 			closeAndUnlock(fd, ifile, null);
-			
-			throw new ObjectStoreException("ShadowingStore::read_state error: "+e);
+
+			throw new ObjectStoreException("ShadowingStore::read_state error: "+e, e);
 		    }
 
 		    /* now try to read the actual image out of the store */
@@ -581,10 +581,10 @@
 		    catch (IOException e)
 		    {
 			closeAndUnlock(fd, ifile, null);
-			
-			throw new ObjectStoreException("ShadowingStore::read_state failed: "+e);
+
+			throw new ObjectStoreException("ShadowingStore::read_state failed: "+e, e);
 		    }
-		    
+
 		    if (!closeAndUnlock(fd, ifile, null))
 		    {
 			if (tsLogger.arjLoggerI18N.isWarnEnabled()){
@@ -608,12 +608,12 @@
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PROTECTED,
 				     FacilityCode.FAC_OBJECT_STORE, "ShadowingStore.remove_state("+objUid+", "+name+", "+ObjectStore.stateTypeString(ft)+")");
 	}
-	
+
 	boolean removeOk = true;
 
 	if (!storeValid())
 	    return false;
-    
+
 	if (name != null)
 	{
 	    int state = currentState(objUid, name);
@@ -661,7 +661,7 @@
 			    }
 			}
 		    }
-		    
+
 		    closeAndUnlock(fd, null, null);
 		}
 		else
@@ -698,7 +698,7 @@
 					    new Object[]{objUid});
 	    }
 	}
-    
+
 	return removeOk;
     }
 
@@ -718,16 +718,16 @@
 	    tsLogger.arjLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PROTECTED,
 				     FacilityCode.FAC_OBJECT_STORE, "ShadowingStore.write_state("+objUid+", "+tName+", "+ObjectStore.stateTypeString(ft)+")");
 	}
-	
+
 	if (!storeValid())
 	    return false;
-    
+
 	if (tName != null)
 	{
 	    String fname = genPathName(objUid, tName, ft);
 	    File fd = openAndLock(fname, FileLock.F_WRLCK, true);
 	    int imageSize = (int) state.length();
-	
+
 	    if (fd == null)
 	    {
 		if (tsLogger.arjLoggerI18N.isWarnEnabled())
@@ -740,7 +740,7 @@
 	    }
 
 	    FileOutputStream ofile = null;
-	    
+
 	    if (imageSize > 0)
 	    {
 		try
@@ -752,9 +752,9 @@
 		    if (synchronousWrites())
 		    {
 			// must flush any in-memory buffering prior to sync
-		    
+
 			ofile.flush();
-		    
+
 			FileDescriptor fileDesc = ofile.getFD();  // assume it's valid!
 			fileDesc.sync();
 		    }
@@ -762,27 +762,27 @@
 		catch (SyncFailedException e)
 		{
 		    closeAndUnlock(fd, null, ofile);
-		    
-		    throw new ObjectStoreException("ShadowingStore::write_state() - write failed to sync for "+fname);
+
+		    throw new ObjectStoreException("ShadowingStore::write_state() - write failed to sync for "+fname, e);
 		}
 		catch (FileNotFoundException e)
 		{
 		    closeAndUnlock(fd, null, ofile);
 
 		    e.printStackTrace();
-		    
-		    throw new ObjectStoreException("ShadowingStore::write_state() - write failed to locate file "+fname+": "+e);
+
+		    throw new ObjectStoreException("ShadowingStore::write_state() - write failed to locate file "+fname+": "+e, e);
 		}
 		catch (IOException e)
 		{
 		    closeAndUnlock(fd, null, ofile);
 
 		    e.printStackTrace();
-		    
-		    throw new ObjectStoreException("ShadowingStore::write_state() - write failed for "+fname+": "+e);
+
+		    throw new ObjectStoreException("ShadowingStore::write_state() - write failed for "+fname+": "+e, e);
 		}
 	    }
-	    
+
 	    if (!closeAndUnlock(fd, null, ofile))
 	    {
 		if (tsLogger.arjLoggerI18N.isWarnEnabled())
@@ -793,7 +793,7 @@
 	    }
 
 	    super.addToCache(fname);
-	    
+
 	    return true;
 	}
 	else
@@ -804,7 +804,7 @@
     {
 	this(locationOfStore, ObjectStore.OS_UNSHARED);
     }
-    
+
 protected ShadowingStore (String locationOfStore, int shareStatus)
     {
 	super(shareStatus);
@@ -814,7 +814,7 @@
 	    tsLogger.arjLogger.debug(DebugLevel.CONSTRUCTORS, VisibilityLevel.VIS_PROTECTED,
 				     FacilityCode.FAC_OBJECT_STORE, "ShadowingStore.ShadowingStore("+locationOfStore+")");
 	}
-	
+
 	try
 	{
 	    setupStore(locationOfStore);
@@ -823,15 +823,15 @@
 	{
 	    tsLogger.arjLogger.fatal(e.getMessage());
 
-	    throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString());
+	    throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString(), e);
 	}
     }
-    
+
 protected ShadowingStore ()
     {
 	this(ObjectStore.OS_UNSHARED);
     }
-    
+
 protected ShadowingStore (int shareStatus)
     {
 	super(shareStatus);

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/accessors/accessor.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/accessors/accessor.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/accessors/accessor.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -24,7 +24,7 @@
  * Arjuna Solutions Limited,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: accessor.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -60,12 +60,12 @@
 	_dropTable = false;
 	_url = null;
     }
-    
+
     public Connection getConnection () throws SQLException
     {
 	return DriverManager.getConnection(_url, null);
     }
-    
+
     public void putConnection (Connection conn)
     {
     }
@@ -74,7 +74,7 @@
     {
 	return _tableName;
     }
-    
+
     public boolean dropTable ()
     {
 	return _dropTable;
@@ -94,7 +94,7 @@
 	}
 	catch (Exception ex)
 	{
-	    throw new FatalError(toString()+" : "+ex);
+	    throw new FatalError(toString()+" : "+ex, ex);
 	}
 
 	if (_url == null)
@@ -104,5 +104,5 @@
     private String  _tableName;
     private boolean _dropTable;
     private String  _url;
-    
+
 }

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/apache_driver.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/apache_driver.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/apache_driver.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -98,7 +98,7 @@
                     if(retryConnection(e, pool)) {
                         return read_state(objUid, tName, ft, tableName);
                     } else {
-                        throw new ObjectStoreException(e.toString());
+                        throw new ObjectStoreException(e.toString(), e);
                     }
                 }
                 finally

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/oracle_8_0_driver.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/oracle_8_0_driver.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/oracle_8_0_driver.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -117,7 +117,7 @@
 				}
 				catch (Exception e)
 				{
-					throw new ObjectStoreException(e.toString());
+					throw new ObjectStoreException(e.toString(), e);
 				}
 				finally
 				{

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	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/oracle_driver.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -65,7 +65,7 @@
 public class oracle_driver extends JDBCImple
 {
     private static final int MAX_RETRIES = 10 ;
-    
+
 	public InputObjectState read_state (Uid objUid, String tName, int ft, String tableName) throws ObjectStoreException
 	{
 		InputObjectState newImage = null;
@@ -87,27 +87,27 @@
         				try
         				{
         					PreparedStatement pstmt = _preparedStatements[pool][READ_STATE];
-        
+
         					if (pstmt == null)
         					{
         						pstmt = _theConnection[pool].prepareStatement("SELECT ObjectState FROM "+tableName+" WHERE UidString = ? AND TypeName = ? AND StateType = ?");
-        
+
         						_preparedStatements[pool][READ_STATE] = pstmt;
         					}
-        
+
         					pstmt.setString(1, objUid.stringForm());
         					pstmt.setString(2, tName);
         					pstmt.setInt(3, ft);
-        
+
         					rs = pstmt.executeQuery();
-        
+
         					if(! rs.next()) {
         						return null; // no matching state in db
         					}
-        					
+
         					Blob myBlob = (Blob)rs.getBlob(1);
         					byte[] buffer = myBlob.getBytes(1, (int)myBlob.length());
-        
+
         					if (buffer != null)
         					{
         						newImage = new InputObjectState(objUid, tName, buffer);
@@ -123,7 +123,7 @@
         				{
                             if (count == MAX_RETRIES-1)
                             {
-                                throw new ObjectStoreException(e.toString());
+                                throw new ObjectStoreException(e.toString(), e);
                             }
                             try
                             {
@@ -131,7 +131,7 @@
                             }
                             catch (final Throwable th)
                             {
-                                throw new ObjectStoreException(e.toString());
+                                throw new ObjectStoreException(e.toString(), th);
                             }
         				}
                     }
@@ -154,7 +154,7 @@
 			throw new ObjectStoreException("oracle.read_state - object with uid "+objUid+" has no TypeName");
 	}
 
-	
+
 	public boolean write_state (Uid objUid, String tName, OutputObjectState state, int s, String tableName) throws ObjectStoreException
 	{
 		int imageSize = (int) state.length();
@@ -177,9 +177,9 @@
         			try
         			{
         				PreparedStatement pstmt = _preparedStatements[pool][READ_WRITE_SHORTCUT];
-        
+
         				_theConnection[pool].setAutoCommit(false);
-        
+
         				if (pstmt == null)
         				{
         					pstmt = _theConnection[pool].prepareStatement("SELECT ObjectState FROM "+tableName+" WHERE UidString = ? AND StateType = ? AND TypeName = ? FOR UPDATE", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
@@ -188,51 +188,51 @@
         				pstmt.setString(1, objUid.stringForm());
         				pstmt.setInt(2, s);
         				pstmt.setString(3, tName);
-        
+
         				rs = pstmt.executeQuery();
-        
+
         				if( rs.next() ) {
-        
+
         					BLOB myBlob = (BLOB)rs.getBlob(1);
         					myBlob.putBytes(1, b);
-        
+
         				} else {
         					// not in database, do insert:
         					PreparedStatement pstmt2 = _preparedStatements[pool][WRITE_STATE_NEW];
-        
+
         					if (pstmt2 == null)
         					{
         						pstmt2 = _theConnection[pool].prepareStatement("INSERT INTO "+tableName+" (StateType,TypeName,UidString,ObjectState) VALUES (?,?,?,empty_blob())");
-        
+
         						_preparedStatements[pool][WRITE_STATE_NEW] = pstmt2;
         					}
-        
+
         					pstmt2.setInt(1, s);
         					pstmt2.setString(2, tName);
         					pstmt2.setString(3, objUid.stringForm());
-        
+
         					pstmt2.executeUpdate();
         					_theConnection[pool].commit();
-        
+
         					PreparedStatement pstmt3 = _preparedStatements[pool][SELECT_FOR_WRITE_STATE];
         					if(pstmt3 == null) {
         						pstmt3 = _theConnection[pool].prepareStatement("SELECT ObjectState FROM "+tableName+" WHERE UidString = ? AND TypeName = ? AND StateType = ? FOR UPDATE");
         						_preparedStatements[pool][SELECT_FOR_WRITE_STATE] = pstmt3;
         					}
-        
+
         					pstmt3.setString(1, objUid.stringForm());
         					pstmt3.setString(2, tName);
         					pstmt3.setInt(3, s);
-        
+
         					rs3 = pstmt3.executeQuery();
         					rs3.next();
         					BLOB myBlob = (BLOB)rs3.getBlob(1);
         					myBlob.putBytes(1, b);
         				}
-        
+
         				_theConnection[pool].commit();
                         return true ;
-        
+
         			}
         			catch(Throwable e)
         			{
@@ -249,7 +249,7 @@
                         }
                         catch (final Throwable th)
                         {
-                            throw new ObjectStoreException(e.toString());
+                            throw new ObjectStoreException(e.toString(), th);
                         }
         			}
                 }

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/sqlserver_driver.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/sqlserver_driver.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/sqlserver_driver.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -98,7 +98,7 @@
 					if(! rs.next()) {
 						return null; // no matching state in db
 					}
-					
+
 					byte[] buffer = rs.getBytes(1);
 
 					if (buffer != null)
@@ -115,7 +115,7 @@
 					if(retryConnection(e, pool)) {
 						return read_state(objUid, tName, ft, tableName);
 					} else {
-						throw new ObjectStoreException(e.toString());
+						throw new ObjectStoreException(e.toString(), e);
 					}
 				}
 				finally
@@ -136,7 +136,7 @@
 		return newImage;
 	}
 
-	
+
 	public boolean write_state (Uid objUid, String tName, OutputObjectState state, int s, String tableName) throws ObjectStoreException
 	{
 		boolean result = false;

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/thread/ThreadSpecificData.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/thread/ThreadSpecificData.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/thread/ThreadSpecificData.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -24,7 +24,7 @@
  * Arjuna Solutions Limited,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: ThreadSpecificData.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -35,10 +35,11 @@
  * A thread specific data implementation. An instance of this class will
  * maintain data on behalf of each thread. One thread cannot gain access to
  * another thread's data.
- * 
+ *
  * @author Mark Little (mark at arjuna.com)
  * @version $Id: ThreadSpecificData.java 2342 2006-03-30 13:06:17Z  $
  * @since JTS 1.0.
+ * @deprecated
  */
 
 public class ThreadSpecificData
@@ -56,7 +57,7 @@
 	/**
 	 * Create a new instance with the specified size. Space will be increased
 	 * dynamically as required.
-	 * 
+	 *
 	 * @deprecated No longer supported.
 	 */
 

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/utils/ExecProcessId.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/utils/ExecProcessId.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/utils/ExecProcessId.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -89,12 +89,12 @@
                     {
                         // http://www.scheibli.com/projects/getpids/index.html (GPL)
                         tempFile = File.createTempFile("getpids", "ts");
-    
+
                         byte[] bytes = new byte[1024];
                         int read;
                         InputStream in  = ExecProcessId.class.getResourceAsStream("getpids.exe");
                         OutputStream out = new FileOutputStream(tempFile);
-                        
+
                         try
                         {
                             while ((read = in.read(bytes)) != -1)
@@ -105,21 +105,21 @@
                             in.close();
                             out.close();
                         }
-    
+
                         cmd = new String[] { tempFile.getAbsolutePath() };
                     }
                     catch (final Exception ex)
                     {
                         throw new FatalError(
                                 tsLogger.log_mesg
-                                        .getString("com.arjuna.ats.internal.arjuna.utils.ExecProcessId_2")+" "+ex);
+                                        .getString("com.arjuna.ats.internal.arjuna.utils.ExecProcessId_2")+" "+ex, ex);
                     }
                 }
-                
+
                 if (cmd != null)
                 {
                     Process p = null;
-                    
+
                     try
                     {
                         p = Runtime.getRuntime().exec(cmd);
@@ -128,13 +128,13 @@
                     {
                         throw new FatalError(
                                 tsLogger.log_mesg
-                                        .getString("com.arjuna.ats.internal.arjuna.utils.ExecProcessId_3")+" "+ex);
+                                        .getString("com.arjuna.ats.internal.arjuna.utils.ExecProcessId_3")+" "+ex, ex);
                     }
-                    
-                    ByteArrayOutputStream bstream = new ByteArrayOutputStream();                    
+
+                    ByteArrayOutputStream bstream = new ByteArrayOutputStream();
                     byte[] bytes = new byte[1024];
                     int read;
-                    
+
                     try
                     {
                         while ((read = p.getInputStream().read(bytes)) != -1)
@@ -144,7 +144,7 @@
                     {
                         throw new FatalError(
                                 tsLogger.log_mesg
-                                        .getString("com.arjuna.ats.internal.arjuna.utils.ExecProcessId_4")+" "+ex);
+                                        .getString("com.arjuna.ats.internal.arjuna.utils.ExecProcessId_4")+" "+ex, ex);
                     }
                     finally
                     {
@@ -161,13 +161,13 @@
                             }
                         }
                     }
-                    
+
                     if (tempFile != null)
                         tempFile.delete();
 
                     StringTokenizer theTokenizer = new StringTokenizer(bstream.toString());
                     theTokenizer.nextToken();
-                    
+
                     String pid = theTokenizer.nextToken();
 
                     try
@@ -176,7 +176,7 @@
                     }
                     catch (final Exception ex)
                     {
-                        
+
                     }
                 }
             }

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/utils/MBeanProcessId.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/utils/MBeanProcessId.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/utils/MBeanProcessId.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -39,7 +39,7 @@
 
 /**
  * Obtains a unique value to represent the process id via ManagementFactory.getRuntimeMXBean().getName().
- * 
+ *
  * WARNING: use with care because the contents of getName may change between OSes and versions of
  * JDK.
  */
@@ -64,23 +64,23 @@
         {
             if (_pid == -1)
             {
-                String name = ManagementFactory.getRuntimeMXBean().getName(); 
+                String name = ManagementFactory.getRuntimeMXBean().getName();
                 String[] parsed = name.split("@");
-               
+
                 try
                 {
                     _pid = Integer.valueOf(parsed[0]);
                 }
                 catch (final Exception ex)
                 {
-                    throw new FatalError(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.utils.MBeanProcessId_2")+" "+name);
+                    throw new FatalError(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.utils.MBeanProcessId_2")+" "+name, ex);
                 }
             }
         }
-        
+
         if (_pid == -1)
             throw new FatalError(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.utils.MBeanProcessId_1"));
-        
+
         return _pid;
     }
 

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/utils/ManualProcessId.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/utils/ManualProcessId.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/utils/ManualProcessId.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -39,13 +39,13 @@
 
 /**
  * Obtains a unique value to represent the process id via configuration.
- * 
+ *
  * Other options include ...
- * 
+ *
  * int pid = Integer.parseInt((new File("/proc/self")).getCanonicalFile().getName());  // linux specific
- * 
+ *
  * Un*x specific ...
- * 
+ *
  * String[] cmd = {"/bin/sh", "-c", "echo $PPID"};
  *                     Process proc = Runtime.getRuntime().exec(cmd);
  *
@@ -55,29 +55,29 @@
  *                       _pid = field.getInt(proc);  // although this is the child pid!
  *
  *                       proc.destroy();
- * 
+ *
  * byte[] ba = new byte[100];
  * String[] cmd = {"/bin/sh", "-c", "echo $PPID"};
  * Process proc = Runtime.getRuntime().exec(cmd);
  * proc.getInputStream().read(ba);
  * System.out.println(new String(ba));
- * 
+ *
  * http://java.sun.com/javase/6/docs/jdk/api/attach/spec/com/sun/tools/attach/VirtualMachine.html  // JDK 6 only
- * 
+ *
  * and ...
- * 
+ *
  * MonitoredHost host = MonitoredHost.getMonitoredHost(null);
  *
  * for (Object activeVmPid : host.activeVms())
  * int pid = (Integer) activeVmPid;
- * 
+ *
  * and ...
- * 
+ *
  * Process proc = Runtime.getRuntime().exec(cmd);
- *  
+ *
  * Field field = proc.getClass().getDeclaredField("pid");
  * field.setAccessible(true);
- *                   
+ *
  * _pid = field.getInt(proc);  // although this is the child pid!
  */
 
@@ -105,24 +105,24 @@
             if (_pid == -1)
             {
                 String pid = arjPropertyManager.getPropertyManager().getProperty(Environment.PROCESS_IDENTIFIER);
-                
+
                 if (pid == null)
                     throw new FatalError(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.utils.ManualProcessId_1"));
-                
+
                 try
                 {
                     _pid = Integer.parseInt(pid);
                 }
                 catch (final Exception ex)
                 {
-                    throw new FatalError(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.utils.ManualProcessId_3")+" "+pid);
+                    throw new FatalError(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.utils.ManualProcessId_3")+" "+pid, ex);
                 }
             }
         }
-        
+
         if (_pid == -1)
             throw new FatalError(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.utils.ManualProcessId_1"));
-        
+
         return _pid;
     }
 

Modified: labs/jbosstm/trunk/ArjunaCore/tsmx/classes/com/arjuna/ats/internal/tsmx/agent/exceptions/NotSupportedException.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/tsmx/classes/com/arjuna/ats/internal/tsmx/agent/exceptions/NotSupportedException.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/tsmx/classes/com/arjuna/ats/internal/tsmx/agent/exceptions/NotSupportedException.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -25,33 +25,70 @@
  * Newcastle upon Tyne,
  * Tyne and Wear,
  * UK.
- * 
+ *
  * $Id: NotSupportedException.java 2342 2006-03-30 13:06:17Z  $
  */
 package com.arjuna.ats.internal.tsmx.agent.exceptions;
 
+/**
+ * @deprecated
+ */
 public class NotSupportedException extends Exception
 {
-	/**
-	 * Constructs a new exception with <code>null</code> as its detail message.
-	 * The cause is not initialized, and may subsequently be initialized by a
-	 * call to {@link #initCause}.
-	 */
-	public NotSupportedException()
-	{
-		super();
-	}
+    /**
+     * Constructs a new exception with the specified cause and a detail
+     * message of <tt>(cause==null ? null : cause.toString())</tt> (which
+     * typically contains the class and detail message of <tt>cause</tt>).
+     * This constructor is useful for exceptions that are little more than
+     * wrappers for other throwables (for example, {@link
+     * java.security.PrivilegedActionException}).
+     *
+     * @param cause the cause (which is saved for later retrieval by the
+     *              {@link #getCause()} method).  (A <tt>null</tt> value is
+     *              permitted, and indicates that the cause is nonexistent or
+     *              unknown.)
+     * @since 1.4
+     */
+    public NotSupportedException(Throwable cause) {
+        super(cause);
+    }
 
-	/**
-	 * Constructs a new exception with the specified detail message.  The
-	 * cause is not initialized, and may subsequently be initialized by
-	 * a call to {@link #initCause}.
-	 *
-	 * @param   message   the detail message. The detail message is saved for
-	 *          later retrieval by the {@link #getMessage()} method.
-	 */
-	public NotSupportedException(String message)
-	{
-		super(message);
-	}
+    /**
+     * Constructs a new exception with <code>null</code> as its detail message.
+     * The cause is not initialized, and may subsequently be initialized by a
+     * call to {@link #initCause}.
+     */
+    public NotSupportedException() {
+        super();
+    }
+
+    /**
+     * Constructs a new exception with the specified detail message.  The
+     * cause is not initialized, and may subsequently be initialized by
+     * a call to {@link #initCause}.
+     *
+     * @param message the detail message. The detail message is saved for
+     *                later retrieval by the {@link #getMessage()} method.
+     */
+    public NotSupportedException(String message) {
+        super(message);
+    }
+
+    /**
+     * Constructs a new exception with the specified detail message and
+     * cause.  <p>Note that the detail message associated with
+     * <code>cause</code> is <i>not</i> automatically incorporated in
+     * this exception's detail message.
+     *
+     * @param message the detail message (which is saved for later retrieval
+     *                by the {@link #getMessage()} method).
+     * @param cause   the cause (which is saved for later retrieval by the
+     *                {@link #getCause()} method).  (A <tt>null</tt> value is
+     *                permitted, and indicates that the cause is nonexistent or
+     *                unknown.)
+     * @since 1.4
+     */
+    public NotSupportedException(String message, Throwable cause) {
+        super(message, cause);
+    }
 }

Modified: labs/jbosstm/trunk/ArjunaCore/tsmx/classes/com/arjuna/ats/internal/tsmx/mbeans/MappingsNotFoundException.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/tsmx/classes/com/arjuna/ats/internal/tsmx/mbeans/MappingsNotFoundException.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/tsmx/classes/com/arjuna/ats/internal/tsmx/mbeans/MappingsNotFoundException.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -25,33 +25,67 @@
  * Newcastle upon Tyne,
  * Tyne and Wear,
  * UK.
- * 
+ *
  * $Id: MappingsNotFoundException.java 2342 2006-03-30 13:06:17Z  $
  */
 package com.arjuna.ats.internal.tsmx.mbeans;
 
 public class MappingsNotFoundException extends Exception
 {
-	/**
-	 * Constructs a new exception with <code>null</code> as its detail message.
-	 * The cause is not initialized, and may subsequently be initialized by a
-	 * call to {@link #initCause}.
-	 */
-	public MappingsNotFoundException()
-	{
-		super();
-	}
+    /**
+     * Constructs a new exception with <code>null</code> as its detail message.
+     * The cause is not initialized, and may subsequently be initialized by a
+     * call to {@link #initCause}.
+     */
+    public MappingsNotFoundException() {
+        super();
+    }
 
-	/**
-	 * Constructs a new exception with the specified detail message.  The
-	 * cause is not initialized, and may subsequently be initialized by
-	 * a call to {@link #initCause}.
-	 *
-	 * @param   message   the detail message. The detail message is saved for
-	 *          later retrieval by the {@link #getMessage()} method.
-	 */
-	public MappingsNotFoundException(String message)
-	{
-		super(message);
-	}
+    /**
+     * Constructs a new exception with the specified detail message.  The
+     * cause is not initialized, and may subsequently be initialized by
+     * a call to {@link #initCause}.
+     *
+     * @param message the detail message. The detail message is saved for
+     *                later retrieval by the {@link #getMessage()} method.
+     */
+    public MappingsNotFoundException(String message) {
+        super(message);
+    }
+
+    /**
+     * Constructs a new exception with the specified detail message and
+     * cause.  <p>Note that the detail message associated with
+     * <code>cause</code> is <i>not</i> automatically incorporated in
+     * this exception's detail message.
+     *
+     * @param message the detail message (which is saved for later retrieval
+     *                by the {@link #getMessage()} method).
+     * @param cause   the cause (which is saved for later retrieval by the
+     *                {@link #getCause()} method).  (A <tt>null</tt> value is
+     *                permitted, and indicates that the cause is nonexistent or
+     *                unknown.)
+     * @since 1.4
+     */
+    public MappingsNotFoundException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    /**
+     * Constructs a new exception with the specified cause and a detail
+     * message of <tt>(cause==null ? null : cause.toString())</tt> (which
+     * typically contains the class and detail message of <tt>cause</tt>).
+     * This constructor is useful for exceptions that are little more than
+     * wrappers for other throwables (for example, {@link
+     * java.security.PrivilegedActionException}).
+     *
+     * @param cause the cause (which is saved for later retrieval by the
+     *              {@link #getCause()} method).  (A <tt>null</tt> value is
+     *              permitted, and indicates that the cause is nonexistent or
+     *              unknown.)
+     * @since 1.4
+     */
+    public MappingsNotFoundException(Throwable cause) {
+        super(cause);
+    }
 }

Modified: labs/jbosstm/trunk/ArjunaCore/tsmx/classes/com/arjuna/ats/internal/tsmx/mbeans/PropertyServiceJMXPlugin.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/tsmx/classes/com/arjuna/ats/internal/tsmx/mbeans/PropertyServiceJMXPlugin.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/tsmx/classes/com/arjuna/ats/internal/tsmx/mbeans/PropertyServiceJMXPlugin.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -57,7 +57,7 @@
 		}
 		catch (Exception e)
 		{
-			throw new ManagementPluginException("Failed to register mbeans: "+e);
+			throw new ManagementPluginException("Failed to register mbeans: "+e, e);
 		}
 	}
 

Modified: labs/jbosstm/trunk/ArjunaCore/tsmx/classes/com/arjuna/ats/internal/tsmx/mbeans/PropertyServiceMBeanWrapper.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/tsmx/classes/com/arjuna/ats/internal/tsmx/mbeans/PropertyServiceMBeanWrapper.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/tsmx/classes/com/arjuna/ats/internal/tsmx/mbeans/PropertyServiceMBeanWrapper.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -140,7 +140,7 @@
 			}
 			catch (java.io.IOException e)
 			{
-				throw new MappingsNotFoundException("Failed to load property-to-attribute mappings (" + name + MAPPINGS_FILENAME_SUFFIX + ")");
+				throw new MappingsNotFoundException("Failed to load property-to-attribute mappings (" + name + MAPPINGS_FILENAME_SUFFIX + ")", e);
 			}
 		}
 		else

Modified: labs/jbosstm/trunk/ArjunaCore/tsmx/classes/com/arjuna/ats/tsmx/agent/exceptions/AgentNotFoundException.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/tsmx/classes/com/arjuna/ats/tsmx/agent/exceptions/AgentNotFoundException.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/tsmx/classes/com/arjuna/ats/tsmx/agent/exceptions/AgentNotFoundException.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -25,33 +25,67 @@
  * Newcastle upon Tyne,
  * Tyne and Wear,
  * UK.
- * 
+ *
  * $Id: AgentNotFoundException.java 2342 2006-03-30 13:06:17Z  $
  */
 package com.arjuna.ats.tsmx.agent.exceptions;
 
 public class AgentNotFoundException extends Exception
 {
-	/**
-	 * Constructs a new exception with <code>null</code> as its detail message.
-	 * The cause is not initialized, and may subsequently be initialized by a
-	 * call to {@link #initCause}.
-	 */
-	public AgentNotFoundException()
-	{
-		super();
-	}
+    /**
+     * Constructs a new exception with <code>null</code> as its detail message.
+     * The cause is not initialized, and may subsequently be initialized by a
+     * call to {@link #initCause}.
+     */
+    public AgentNotFoundException() {
+        super();
+    }
 
-	/**
-	 * Constructs a new exception with the specified detail message.  The
-	 * cause is not initialized, and may subsequently be initialized by
-	 * a call to {@link #initCause}.
-	 *
-	 * @param   message   the detail message. The detail message is saved for
-	 *          later retrieval by the {@link #getMessage()} method.
-	 */
-	public AgentNotFoundException(String message)
-	{
-		super(message);
-	}
+    /**
+     * Constructs a new exception with the specified detail message.  The
+     * cause is not initialized, and may subsequently be initialized by
+     * a call to {@link #initCause}.
+     *
+     * @param message the detail message. The detail message is saved for
+     *                later retrieval by the {@link #getMessage()} method.
+     */
+    public AgentNotFoundException(String message) {
+        super(message);
+    }
+
+    /**
+     * Constructs a new exception with the specified detail message and
+     * cause.  <p>Note that the detail message associated with
+     * <code>cause</code> is <i>not</i> automatically incorporated in
+     * this exception's detail message.
+     *
+     * @param message the detail message (which is saved for later retrieval
+     *                by the {@link #getMessage()} method).
+     * @param cause   the cause (which is saved for later retrieval by the
+     *                {@link #getCause()} method).  (A <tt>null</tt> value is
+     *                permitted, and indicates that the cause is nonexistent or
+     *                unknown.)
+     * @since 1.4
+     */
+    public AgentNotFoundException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    /**
+     * Constructs a new exception with the specified cause and a detail
+     * message of <tt>(cause==null ? null : cause.toString())</tt> (which
+     * typically contains the class and detail message of <tt>cause</tt>).
+     * This constructor is useful for exceptions that are little more than
+     * wrappers for other throwables (for example, {@link
+     * java.security.PrivilegedActionException}).
+     *
+     * @param cause the cause (which is saved for later retrieval by the
+     *              {@link #getCause()} method).  (A <tt>null</tt> value is
+     *              permitted, and indicates that the cause is nonexistent or
+     *              unknown.)
+     * @since 1.4
+     */
+    public AgentNotFoundException(Throwable cause) {
+        super(cause);
+    }
 }

Modified: labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/internal/txoj/lockstore/BasicPersistentLockStore.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/internal/txoj/lockstore/BasicPersistentLockStore.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/internal/txoj/lockstore/BasicPersistentLockStore.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -24,7 +24,7 @@
  * Arjuna Solutions Limited,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: BasicPersistentLockStore.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -68,7 +68,7 @@
      * Ignore key as we can make use of the basic type information for
      * this type of store. Really only need it for shared memory.
      */
-    
+
     public BasicPersistentLockStore (String key)
     {
 	if (txojLogger.aitLogger.debugAllowed())
@@ -83,7 +83,7 @@
 		lockStoreLocation = com.arjuna.ats.txoj.common.Configuration.lockStoreRoot();
 	    com.arjuna.ats.txoj.common.Configuration.setLockStoreRoot(lockStoreLocation);
 	}
-	
+
 	_key = lockStoreLocation;
 
 	/*
@@ -91,7 +91,7 @@
 	 * we require. The default object store assumes locking is provided
 	 * entirely by the object.
 	 */
-	
+
 	_lockStore = new ObjectStore(ArjunaNames.Implementation_ObjectStore_ShadowingStore(), _key);
     }
 
@@ -102,17 +102,17 @@
 	    txojLogger.aitLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
 				     FacilityCode.FAC_LOCK_STORE, "BasicPersistentLockStore.read_state("+u+", "+tName+")");
 	}
-	
+
 	try
 	{
 	    return _lockStore.read_committed(u, tName);
 	}
 	catch (ObjectStoreException e)
 	{
-	    throw new LockStoreException("Persistent store error.");
+	    throw new LockStoreException("Persistent store error.", e);
 	}
     }
-    
+
 public boolean remove_state (Uid u, String tName)
     {
 	if (txojLogger.aitLogger.debugAllowed())
@@ -130,16 +130,16 @@
 	    return false;
 	}
     }
-    
+
 public boolean write_committed (Uid u, String tName, OutputObjectState state)
     {
 	if (txojLogger.aitLogger.debugAllowed())
 	{
 	    txojLogger.aitLogger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
-				     FacilityCode.FAC_LOCK_STORE, 
+				     FacilityCode.FAC_LOCK_STORE,
 				     "BasicPersistentLockStore.write_committed("+u+", "+tName+", "+state+")");
 	}
-	
+
 	try
 	    {
 		return _lockStore.write_committed(u, tName, state);
@@ -158,21 +158,21 @@
 public static ClassName name ()
     {
 	return TxOJNames.Implementation_LockStore_BasicPersistentLockStore();
-    }    
+    }
 
 public static final BasicPersistentLockStore create (Object[] param)
     {
 	if (param == null)
 	    return null;
-	
+
 	String key = (String) param[0];
 
 	return new BasicPersistentLockStore(key);
     }
-    
+
 private String      _key;
 private ObjectStore _lockStore;
 
 private static String lockStoreLocation = null;
-    
+
 }

Modified: labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/txoj/LockMode.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/txoj/LockMode.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/txoj/LockMode.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -24,7 +24,7 @@
  * Arjuna Solutions Limited,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: LockMode.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -57,11 +57,9 @@
     
     /**
      * Print a human-readable form of the lock type.
-     *
-     * @deprecated Use stringForm
      */
 
-    public static String printString (int l)
+    private static String printString (int l)
     {
 	switch (l)
 	{
@@ -84,5 +82,5 @@
     {
 	strm.print(LockMode.printString(l));
     }
-    
+
 }

Modified: labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/txoj/exceptions/LockStoreException.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/txoj/exceptions/LockStoreException.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaCore/txoj/classes/com/arjuna/ats/txoj/exceptions/LockStoreException.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * 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. 
+ * 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 
+ * 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, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -24,7 +24,7 @@
  * Arjuna Solutions Limited,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: LockStoreException.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -44,16 +44,61 @@
 
 public class LockStoreException extends Exception
 {
+    /**
+     * Constructs a new exception with <code>null</code> as its detail message.
+     * The cause is not initialized, and may subsequently be initialized by a
+     * call to {@link #initCause}.
+     */
+    public LockStoreException() {
+        super();
+    }
 
-public LockStoreException ()
-    {
-	super();
+    /**
+     * Constructs a new exception with the specified detail message.  The
+     * cause is not initialized, and may subsequently be initialized by
+     * a call to {@link #initCause}.
+     *
+     * @param message the detail message. The detail message is saved for
+     *                later retrieval by the {@link #getMessage()} method.
+     */
+    public LockStoreException(String message) {
+        super(message);
     }
 
-public LockStoreException (String s)
-    {
-	super(s);
+    /**
+     * Constructs a new exception with the specified detail message and
+     * cause.  <p>Note that the detail message associated with
+     * <code>cause</code> is <i>not</i> automatically incorporated in
+     * this exception's detail message.
+     *
+     * @param message the detail message (which is saved for later retrieval
+     *                by the {@link #getMessage()} method).
+     * @param cause   the cause (which is saved for later retrieval by the
+     *                {@link #getCause()} method).  (A <tt>null</tt> value is
+     *                permitted, and indicates that the cause is nonexistent or
+     *                unknown.)
+     * @since 1.4
+     */
+    public LockStoreException(String message, Throwable cause) {
+        super(message, cause);
     }
-    
+
+    /**
+     * Constructs a new exception with the specified cause and a detail
+     * message of <tt>(cause==null ? null : cause.toString())</tt> (which
+     * typically contains the class and detail message of <tt>cause</tt>).
+     * This constructor is useful for exceptions that are little more than
+     * wrappers for other throwables (for example, {@link
+     * java.security.PrivilegedActionException}).
+     *
+     * @param cause the cause (which is saved for later retrieval by the
+     *              {@link #getCause()} method).  (A <tt>null</tt> value is
+     *              permitted, and indicates that the cause is nonexistent or
+     *              unknown.)
+     * @since 1.4
+     */
+    public LockStoreException(Throwable cause) {
+        super(cause);
+    }
 }
 

Modified: labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/TransactionImple.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/TransactionImple.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/TransactionImple.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1700,7 +1700,7 @@
 								{ e });
 			}
 
-			throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString());
+			throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString(), e);
 		}
 
 		return false;
@@ -1767,7 +1767,7 @@
 										XAHelper.printXAErrorCode(ex) });
 			}
 
-			throw new com.arjuna.ats.arjuna.exceptions.FatalError(ex.toString());
+			throw new com.arjuna.ats.arjuna.exceptions.FatalError(ex.toString(), ex);
 		}
 		catch (Exception e)
 		{
@@ -1780,7 +1780,7 @@
 								{ e });
 			}
 
-			throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString());
+			throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString(), e);
 		}
 
 		return null;
@@ -1906,7 +1906,7 @@
 	private final boolean _xaTransactionTimeoutEnabled;
 
 	private Map _txLocalResources;
-    
+
     private Throwable _rollbackOnlyCallerStacktrace;
 
 	/**

Modified: labs/jbosstm/trunk/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts/TransactionImple.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts/TransactionImple.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts/TransactionImple.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1419,7 +1419,7 @@
 			     * In JTS/OTS we can indicate that something was terminated by another thread.
 			     * JTA doesn't really prevent this, but ...
 			     */
-			    
+
 				//throw new IllegalStateException(
 				//		jtaLogger.loggerI18N.getString("com.arjuna.ats.internal.jta.transaction.jts.invalidtx2"));
 			}
@@ -1676,7 +1676,7 @@
 				jtaLogger.loggerI18N.warn("com.arjuna.ats.internal.jta.transaction.jts.threaderror", e);
 			}
 
-			throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString());
+			throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString(), e);
 		}
 
 		return false;
@@ -1736,7 +1736,7 @@
 				{ "TransactionImple.isNewRM", XAHelper.printXAErrorCode(ex) });
 			}
 
-			throw new com.arjuna.ats.arjuna.exceptions.FatalError(ex.toString());
+			throw new com.arjuna.ats.arjuna.exceptions.FatalError(ex.toString(), ex);
 		}
 		catch (Exception e)
 		{
@@ -1745,7 +1745,7 @@
 				jtaLogger.loggerI18N.warn("com.arjuna.ats.internal.jta.transaction.jts.rmerror", e);
 			}
 
-			throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString());
+			throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString(), e);
 		}
 
 		return null;
@@ -1881,7 +1881,7 @@
     private Map _txLocalResources;
 
     private Throwable _rollbackOnlyCallerStacktrace;
-    
+
         /**
          * Count of last resources seen in this transaction.
          */

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/OTSImpleManager.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/OTSImpleManager.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/OTSImpleManager.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,8 +1,8 @@
 /*
  * 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 
+ * 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
@@ -14,7 +14,7 @@
  * 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.
  */
@@ -24,7 +24,7 @@
  * Hewlett-Packard Arjuna Labs,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: OTSImpleManager.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -69,7 +69,7 @@
  * TransactionFactoryImple. Applications should not use this class directly, but
  * should instead go via com.arjuna.ats.jts.OTSManager which gives a purely
  * CORBA view of things.
- * 
+ *
  * @author Mark Little (mark_little at hp.com)
  * @version $Id: OTSImpleManager.java 2342 2006-03-30 13:06:17Z  $
  * @since JTS 1.0.
@@ -258,7 +258,7 @@
 						}
 
 						throw new com.arjuna.ats.arjuna.exceptions.FatalError(
-								e1.toString());
+								e1.toString(), e1);
 					}
 					catch (BAD_PARAM ex1)
 					{
@@ -269,7 +269,7 @@
 						}
 
 						throw new com.arjuna.ats.arjuna.exceptions.FatalError(
-								ex1.toString());
+								ex1.toString(), ex1);
 					}
 					catch (IOException e2)
 					{
@@ -280,7 +280,7 @@
 						}
 
 						throw new com.arjuna.ats.arjuna.exceptions.FatalError(
-								e2.toString());
+								e2.toString(), e2);
 					}
 					catch (SystemException e3)
 					{
@@ -291,7 +291,7 @@
 						}
 
 						throw new com.arjuna.ats.arjuna.exceptions.FatalError(
-								e3.toString());
+								e3.toString(), e3);
 					}
 					catch (UserException e4)
 					{
@@ -302,7 +302,7 @@
 						}
 
 						throw new com.arjuna.ats.arjuna.exceptions.FatalError(
-								e4.toString());
+								e4.toString(), e4);
 					}
 				}
 				else
@@ -325,7 +325,7 @@
 					OTSImpleManager._current = null;
 
 					throw new com.arjuna.ats.arjuna.exceptions.FatalError(
-							"OTSImpleManager.current: " + e.toString());
+							"OTSImpleManager.current: " + e.toString(), e);
 				}
 			}
 		}

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/context/ContextManager.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/context/ContextManager.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/context/ContextManager.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,8 +1,8 @@
 /*
  * 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 
+ * 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
@@ -14,7 +14,7 @@
  * 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.
  */
@@ -24,7 +24,7 @@
  * Hewlett-Packard Arjuna Labs,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: ContextManager.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -100,7 +100,7 @@
      */
 
     public ContextManager ()
-    {	
+    {
 	if (jtsLogger.logger.isDebugEnabled())
 	{
 	    jtsLogger.logger.debug(DebugLevel.CONSTRUCTORS, VisibilityLevel.VIS_PUBLIC,
@@ -120,7 +120,7 @@
 
 	    ex.printStackTrace();
 
-	    throw new FatalError("ContextManager "+jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.context.picreffail")+" "+ex);
+	    throw new FatalError("ContextManager "+jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.context.picreffail")+" "+ex, ex);
 	}
 	catch (Exception ex)
 	{
@@ -131,7 +131,7 @@
 
 	    ex.printStackTrace();
 
-	    throw new FatalError("ContextManager "+jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.context.picreffail")+" "+ex);
+	    throw new FatalError("ContextManager "+jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.context.picreffail")+" "+ex, ex);
 	}
     }
 
@@ -227,7 +227,7 @@
 		}
 
 		ex.printStackTrace();
-		
+
 		throw new BAD_OPERATION();
 	    }
 	}
@@ -262,12 +262,12 @@
 	    catch (EmptyStackException e)
 	    {
 	    }
-	
+
 	    /*
 	     * If size now zero we can delete from thread
 	     * specific data.
 	     */
-	
+
 	    if (sl.size() == 0)
 	    {
 		sl = null;
@@ -277,12 +277,12 @@
 		disassociateContext();
 	    }
 	}
-	
+
 	/*
 	 * Now update action in thread's notion of current if
 	 * this action is local.
 	 */
-    
+
 	// Check that action is local and not a proxy.
 
 	if (action != null)
@@ -291,7 +291,7 @@
 	     * Now update action in thread's notion of current if
 	     * this action is local.
 	     */
-    
+
 	    // Check that action is local and not a proxy.
 
 	    if (action.isLocal())
@@ -311,7 +311,7 @@
 		}
 	    }
 	}
-	
+
 	return action;
     }
 
@@ -334,7 +334,7 @@
 	 * finished with them does not mean other threads
 	 * are!
 	 */
-	
+
 	ControlWrapper ptr = popAction(threadId);
 
 	while (ptr != null)
@@ -342,7 +342,7 @@
 	    ptr = null;
 
 	    ptr = popAction(threadId);
-	    
+
 	} while (ptr != null);
     }
 
@@ -358,7 +358,7 @@
      * @since JTS 2.1.1.
      */
 
-    public void associate () throws SystemException 
+    public void associate () throws SystemException
     {
 	current();
     }
@@ -392,7 +392,7 @@
 	else
 	{
 	    boolean isError = false;
-    
+
 	    try
 	    {
 		Coordinator coord = cont.get_coordinator();
@@ -403,7 +403,7 @@
 		    /*
 		     * Depth must be non-zero or we wouldn't be here!
 		     */
-	    
+
 		    int depth = ctx.parents.length;
 
 		    for (int i = depth -1; i >= 0; i--)
@@ -417,10 +417,10 @@
 			Terminator tmpTerm = ctx.parents[i].term;
 
 			Control theControl = TransactionFactoryImple.createProxy(tmpCoord, tmpTerm);
-		
+
 			pushAction(new ControlWrapper(theControl));  // takes care of thread/BasicAction for us.
 		    }
-		    
+
 		    ctx = null;
 		}
 		else
@@ -429,7 +429,7 @@
 		     * If we can't get a propagation context then we cannot
 		     * create the hierarchy!
 		     */
-	    
+
 		    isError = true;
 		}
 
@@ -457,7 +457,7 @@
 	}
 
 	boolean isError = false;
-    
+
 	try
 	{
 	    ActionControl actControl = cont;
@@ -486,13 +486,13 @@
 	    try
 	    {
 		ControlWrapper wrapper = (ControlWrapper) hier.pop();
-	    
+
 		while (wrapper != null)
 		{
 		    pushAction(wrapper);
-		
+
 		    wrapper = null;
-		
+
 		    wrapper = (ControlWrapper) hier.pop();
 		}
 	    }
@@ -509,7 +509,7 @@
 	    }
 
 	    e.printStackTrace();
-	    
+
 	    isError = true;
 	}
 
@@ -530,7 +530,7 @@
 	}
 
 	boolean isError = false;
-    
+
 	try
 	{
 	    ControlImple curr = which.getParentImple();
@@ -546,13 +546,13 @@
 	    try
 	    {
 		ControlWrapper wrapper = (ControlWrapper) hier.pop();
-	    
+
 		while (wrapper != null)
 		{
 		    pushAction(wrapper);
-		
+
 		    wrapper = null;
-		
+
 		    wrapper = (ControlWrapper) hier.pop();
 		}
 	    }
@@ -567,15 +567,15 @@
 		jtsLogger.loggerI18N.warn("com.arjuna.ats.internal.jts.context.genfail",
 					  new Object[] { "ContextManager.addActionControlImple", e} );
 	    }
-	    
+
 	    e.printStackTrace();
-	    
+
 	    isError = true;
 	}
 
 	return isError;
     }
-    
+
     /**
      * If we have a hierarchy of remote actions (controls) then they will not
      * be registered with BasicAction.
@@ -595,7 +595,7 @@
 	final String threadId = ThreadUtil.getThreadId() ;
 	Stack sl = (Stack) otsCurrent.get(threadId);
 	boolean isNew = false;
-	
+
 	if (sl == null)
 	{
 	    isNew = true;
@@ -655,7 +655,7 @@
 	    try
 	    {
 		int slotId = OTSManager.getReceivedSlotId();
-		
+
 		if (slotId == -1)
 		    return null;
 
@@ -670,7 +670,7 @@
 		if (ctx.type().kind().value() != TCKind._tk_null)
 		{
 		    ControlWrapper control = null;
-		    
+
 		    // Is this just a Coordinator, or a full blown context?
 
 		    if (ctx.type().kind().value() == TCKind._tk_string)
@@ -702,7 +702,7 @@
 	    catch (InvalidSlot is)
 	    {
 		// Something very wrong
-		
+
 		throw new org.omg.CORBA.INTERNAL();
 	    }
 	}
@@ -717,7 +717,7 @@
     public final ControlWrapper createProxy (org.omg.CORBA.Any ctx) throws SystemException
     {
 	String stringRef = null;
-	
+
 	try
 	{
 	    stringRef = ctx.extract_string();
@@ -742,7 +742,7 @@
 	    {
 		org.omg.CORBA.Object obj = ORBManager.getORB().orb().string_to_object(stringRef);
 		Coordinator theCoordinator = org.omg.CosTransactions.CoordinatorHelper.narrow(obj);
-	    
+
 		if (theCoordinator == null)
 		    throw new BAD_PARAM();
 
@@ -782,7 +782,7 @@
 	    try
 	    {
 		PropagationContext theContext = org.omg.CosTransactions.PropagationContextHelper.extract(ctx);
-	    
+
 		if (OTSImpleManager.localFactory())
 		{
 		    TransactionFactoryImple theFactory = OTSImpleManager.factory();
@@ -792,7 +792,7 @@
 		else
 		{
 		    TransactionFactory theFactory = OTSImpleManager.get_factory();
-		    
+
 		    return new ControlWrapper(theFactory.recreate(theContext));
 		}
 	    }
@@ -815,7 +815,7 @@
 		}
 
 		e.printStackTrace();
-		
+
 		throw new UNKNOWN();
 	    }
 	}
@@ -830,7 +830,7 @@
 	    try
 	    {
 		int slotId = OTSManager.getLocalSlotId();
-		
+
 		if (slotId != -1)
 		{
 		    org.omg.CORBA.Any localDataAny = ORBManager.getORB().orb().create_any();
@@ -856,7 +856,7 @@
 	    try
 	    {
 		int slotId = OTSManager.getLocalSlotId();
-		
+
 		if (slotId != -1)
 		{
 		    _piCurrent.set_slot(slotId, null);
@@ -876,5 +876,5 @@
     private org.omg.PortableInterceptor.Current _piCurrent = null;
 
     private static final String IORTag = "IOR";
-    
+
 }

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/RecoveryInit.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/RecoveryInit.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/recovery/RecoveryInit.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,8 +1,8 @@
 /*
  * 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 
+ * 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
@@ -14,7 +14,7 @@
  * 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.
  */
@@ -24,7 +24,7 @@
  * Arjuna Solutions Limited,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: RecoveryInit.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -47,9 +47,9 @@
  *   Loading an instance can be achieved by naming the class in an OrbPreInit
  *   property.
  *   <p>Orb-specific details of recovery are handled by this class.
- *  
- * @author Malik SAHEB 
  *
+ * @author Malik SAHEB
+ *
  * @message com.arjuna.ats.internal.jts.recovery.RecoveryInit_1 [com.arjuna.ats.internal.jts.recovery.RecoveryInit_1] - added ORBAttribute for recoveryCoordinatorInitialiser
  * @message com.arjuna.ats.internal.jts.recovery.RecoveryInit_2 [com.arjuna.ats.internal.jts.recovery.RecoveryInit_2] - Full crash recovery is not supported with this orb
  * @message com.arjuna.ats.internal.jts.recovery.RecoveryInit_3 [com.arjuna.ats.internal.jts.recovery.RecoveryInit_3] - Set property {0}  =  {1}
@@ -59,14 +59,14 @@
 
 public class RecoveryInit
 {
-    
+
     private static boolean _initialised = false;
     private static boolean _isNormalProcess = true;
-    
+
     // no accessible variable for this first property name prefix
     private static final String eventHandlerPropertyPrefix = Environment.EVENT_HANDLER;
- 
-    /** 
+
+    /**
      * Constructor does the work as a result of being registered as an ORBPreInit
      * class
      *
@@ -82,7 +82,7 @@
 	if (!_initialised)
 	{
 	    _initialised = true;
-	
+
 	    // the eventhandler is the same for all orbs (at the moment)
 	    String eventHandlerPropertyName = eventHandlerPropertyPrefix + "_Recovery";
 	    String eventHandlerPropertyValue = "com.arjuna.ats.internal.jts.recovery.contact.RecoveryContactWriter";
@@ -90,15 +90,15 @@
 	    Object recoveryCoordinatorInitialiser = null;
 	    String InitClassName = null;
 
-	    if ( _isNormalProcess) 
+	    if ( _isNormalProcess)
 	    {
 		try
 		{
 		    // Use Here a class that should be initialized with a specific class specific to the ORB
 		    // To determine the class to load use the ORBType
-		    
+
 		    int orbType = ORBInfo.getOrbEnumValue();
-			
+
 		    switch (orbType)
 		    {
 		    case ORBType.ORBIX2000:
@@ -122,46 +122,46 @@
 			}
 			break;
 		    }
-		    
+
 		    // register the ContactWriter to watch for the first ArjunaFactory construction
 
 		    opPropertyManager.propertyManager.setProperty(eventHandlerPropertyName,eventHandlerPropertyValue);
-			
-		    // Change here above the way to call this startRCService - 
+
+		    // Change here above the way to call this startRCService -
 		    // otherwise call it in JacOrbRecoveryInit above.
 		}
 		catch (Exception e)
 		{
 		    jtsLogger.loggerI18N.fatal("com.arjuna.ats.internal.jts.recovery.RecoveryInit_4", new Object[] {e});
 
-		    throw new com.arjuna.ats.arjuna.exceptions.FatalError();
+		    throw new com.arjuna.ats.arjuna.exceptions.FatalError(e.toString(), e);
 		}
-		
+
 		if (jtsLogger.loggerI18N.isDebugEnabled())
 		{
-		    jtsLogger.loggerI18N.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, 
-					       FacilityCode.FAC_CRASH_RECOVERY, 
+		    jtsLogger.loggerI18N.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
+					       FacilityCode.FAC_CRASH_RECOVERY,
 					       "com.arjuna.ats.internal.jts.recovery.RecoveryInit_1");
-		    
-		    jtsLogger.loggerI18N.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, 
-					       FacilityCode.FAC_CRASH_RECOVERY, 
-					       "com.arjuna.ats.internal.jts.recovery.RecoveryInit_2", 
+
+		    jtsLogger.loggerI18N.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
+					       FacilityCode.FAC_CRASH_RECOVERY,
+					       "com.arjuna.ats.internal.jts.recovery.RecoveryInit_2",
 					       new Object[] {eventHandlerPropertyName, eventHandlerPropertyValue});
 		}
 	    }
 	}
     }
 	/**
-	 * This static method is used by the RecoveryManager to suppress 
+	 * This static method is used by the RecoveryManager to suppress
 	 * aspects of recovery enablement in it's own
 	 * process, without requiring further property manipulations
 	 */
-    
-    public static void isNotANormalProcess() 
+
+    public static void isNotANormalProcess()
     {
 	_isNormalProcess = false;
     }
-    
+
     public static boolean isNormalProcess ()
     {
 	return _isNormalProcess;

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/hporb/interceptors/context/ContextORBInitializerImpl.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/hporb/interceptors/context/ContextORBInitializerImpl.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/hporb/interceptors/context/ContextORBInitializerImpl.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,8 +1,8 @@
 /*
  * 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 
+ * 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
@@ -14,7 +14,7 @@
  * 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.
  */
@@ -24,7 +24,7 @@
  * Arjuna Solutions Limited,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: ContextORBInitializerImpl.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -45,8 +45,8 @@
 
 import org.omg.CosTransactions.*;
 import org.omg.CORBA.*;
-import org.omg.PortableInterceptor.*; 
-import org.omg.PortableInterceptor.ORBInitInfoPackage.*; 
+import org.omg.PortableInterceptor.*;
+import org.omg.PortableInterceptor.ORBInitInfoPackage.*;
 import org.omg.IOP.*;
 import org.omg.IOP.CodecFactoryPackage.*;
 
@@ -94,13 +94,13 @@
      */
 
     public void post_init (ORBInitInfo init_info)
-    {    
+    {
 	if (jtsLogger.logger.isDebugEnabled())
 	{
 	    jtsLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
 					       (com.arjuna.ats.jts.logging.FacilityCode.FAC_OTS | com.arjuna.ats.jts.logging.FacilityCode.FAC_INTERCEPTOR), "ContextORBInitializer.post_init ()");
 	}
-	
+
 	/*
 	 * These value should be part of the standard.
 	 */
@@ -110,7 +110,7 @@
 
 	com.arjuna.ats.jts.OTSManager.setLocalSlotId(localSlot);
 	com.arjuna.ats.jts.OTSManager.setReceivedSlotId(receivedSlot);
-	
+
 	/*
 	 * Get the CDR codec; used for encoding/decoding the service
 	 * context and IOR components.
@@ -140,9 +140,9 @@
 
 	    ex.printStackTrace();
 
-	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.hporb.interceptors.context.codeccreate"));
+	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.hporb.interceptors.context.codeccreate"), ex);
 	}
-    
+
 	/*
 	 * Register client interceptor to propogate the context.
 	 */
@@ -169,9 +169,9 @@
 
 	    ex.printStackTrace();
 
-	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.hporb.interceptors.context.cie"));
+	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.hporb.interceptors.context.cie"), ex);
 	}
-  
+
 	/*
 	 * Register a server interceptor to receive the context.
 	 */
@@ -198,8 +198,8 @@
 
 	    ex.printStackTrace();
 
-	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.hporb.interceptors.context.sie"));
+	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.hporb.interceptors.context.sie"), ex);
 	}
     }
-  
+
 }

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/hporb/interceptors/interposition/InterpositionORBInitializerImpl.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/hporb/interceptors/interposition/InterpositionORBInitializerImpl.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/hporb/interceptors/interposition/InterpositionORBInitializerImpl.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,8 +1,8 @@
 /*
  * 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 
+ * 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
@@ -14,7 +14,7 @@
  * 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.
  */
@@ -24,7 +24,7 @@
  * Arjuna Solutions Limited,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: InterpositionORBInitializerImpl.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -45,8 +45,8 @@
 
 import org.omg.CosTransactions.*;
 import org.omg.CORBA.*;
-import org.omg.PortableInterceptor.*; 
-import org.omg.PortableInterceptor.ORBInitInfoPackage.*; 
+import org.omg.PortableInterceptor.*;
+import org.omg.PortableInterceptor.ORBInitInfoPackage.*;
 import org.omg.IOP.*;
 import org.omg.IOP.CodecFactoryPackage.*;
 
@@ -74,7 +74,7 @@
 
 	ThreadActionData.addSetup(new InterpositionThreadSetup());
     }
-  
+
 public void pre_init (ORBInitInfo init_info)
     {
 	if (jtsLogger.logger.isDebugEnabled())
@@ -92,7 +92,7 @@
      * @message com.arjuna.ats.internal.jts.orbspecific.hporb.interceptors.interposition.codeccreate Cannot create a codec of the required encoding.
      * @message com.arjuna.ats.internal.jts.orbspecific.hporb.interceptors.interposition.sie A server-side request interceptor already exists with that name.
      */
-  
+
 public void post_init (ORBInitInfo init_info)
     {
 	if (jtsLogger.logger.isDebugEnabled())
@@ -110,7 +110,7 @@
 
 	com.arjuna.ats.jts.OTSManager.setLocalSlotId(localSlot);
 	com.arjuna.ats.jts.OTSManager.setReceivedSlotId(receivedSlot);
-	
+
 	/*
 	 * Get the CDR codec; used for encoding/decoding the service
 	 * context and IOR components.
@@ -140,9 +140,9 @@
 
 	    ex.printStackTrace();
 
-	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.hporb.interceptors.interposition.codeccreate"));
+	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.hporb.interceptors.interposition.codeccreate"), ex);
 	}
-    
+
 	/*
 	 * Register client interceptor to propogate the context.
 	 */
@@ -169,9 +169,9 @@
 
 	    ex.printStackTrace();
 
-	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.hporb.interceptors.interposition.cie"));
+	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.hporb.interceptors.interposition.cie"), ex);
 	}
-  
+
 	/*
 	 * Register a server interceptor to receive the context.
 	 */
@@ -198,8 +198,8 @@
 
 	    ex.printStackTrace();
 
-	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.hporb.interceptors.interposition.sie"));
+	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.hporb.interceptors.interposition.sie"), ex);
 	}
     }
-  
+
 }

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/jacorb/interceptors/context/ContextORBInitializerImpl.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/jacorb/interceptors/context/ContextORBInitializerImpl.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/jacorb/interceptors/context/ContextORBInitializerImpl.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,8 +1,8 @@
 /*
  * 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 
+ * 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
@@ -14,7 +14,7 @@
  * 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.
  */
@@ -24,7 +24,7 @@
  * Arjuna Technologies Ltd.,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: ContextORBInitializerImpl.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -40,8 +40,8 @@
 import com.arjuna.common.util.logging.*;
 
 import org.omg.CORBA.*;
-import org.omg.PortableInterceptor.*; 
-import org.omg.PortableInterceptor.ORBInitInfoPackage.*; 
+import org.omg.PortableInterceptor.*;
+import org.omg.PortableInterceptor.ORBInitInfoPackage.*;
 import org.omg.IOP.*;
 import org.omg.IOP.CodecFactoryPackage.*;
 
@@ -63,7 +63,7 @@
 
 	ThreadActionData.addSetup(new ContextThreadSetup());
     }
-  
+
     /**
      * @message com.arjuna.ats.internal.jts.orbspecific.jacorb.interceptors.context.codecerror {0} - a failure occured when getting {1} codec - unknown encoding.
      * @message com.arjuna.ats.internal.jts.orbspecific.jacorb.interceptors.context.duplicatename {0} - duplicate interceptor name for {1} when registering
@@ -72,13 +72,13 @@
      */
 
     public void pre_init (ORBInitInfo init_info)
-    {    
+    {
 	if (jtsLogger.logger.isDebugEnabled())
 	{
 	    jtsLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
 				   (com.arjuna.ats.jts.logging.FacilityCode.FAC_OTS | com.arjuna.ats.jts.logging.FacilityCode.FAC_INTERCEPTOR), "ContextORBInitializer.pre_init ()");
 	}
-	
+
 	/*
 	 * These value should be part of the standard.
 	 */
@@ -88,7 +88,7 @@
 
 	OTSManager.setLocalSlotId(localSlot);
 	OTSManager.setReceivedSlotId(receivedSlot);
-	
+
 	/*
 	 * Get the CDR codec; used for encoding/decoding the service
 	 * context and IOR components.
@@ -118,9 +118,9 @@
 
 	    ex.printStackTrace();
 
-	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.jacorb.interceptors.context.codeccreate"));
+	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.jacorb.interceptors.context.codeccreate"), ex);
 	}
-    
+
 	/*
 	 * Register client interceptor to propogate the context.
 	 */
@@ -147,9 +147,9 @@
 
 	    ex.printStackTrace();
 
-	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.jacorb.interceptors.context.cie"));
+	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.jacorb.interceptors.context.cie"), ex);
 	}
-  
+
 	/*
 	 * Register a server interceptor to receive the context.
 	 */
@@ -176,10 +176,10 @@
 
 	    ex.printStackTrace();
 
-	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.jacorb.interceptors.context.sie"));
+	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.jacorb.interceptors.context.sie"), ex);
 	}
     }
-  
+
     public void post_init (ORBInitInfo init_info)
     {
 	if (jtsLogger.logger.isDebugEnabled())
@@ -190,5 +190,5 @@
 
 	// nothing to do
     }
-  
+
 }

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/jacorb/interceptors/interposition/InterpositionORBInitializerImpl.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/jacorb/interceptors/interposition/InterpositionORBInitializerImpl.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/jacorb/interceptors/interposition/InterpositionORBInitializerImpl.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,8 +1,8 @@
 /*
  * 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 
+ * 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
@@ -14,7 +14,7 @@
  * 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.
  */
@@ -24,7 +24,7 @@
  * Arjuna Technologies Ltd.,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: InterpositionORBInitializerImpl.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -44,8 +44,8 @@
 import com.arjuna.common.util.logging.*;
 
 import org.omg.CORBA.*;
-import org.omg.PortableInterceptor.*; 
-import org.omg.PortableInterceptor.ORBInitInfoPackage.*; 
+import org.omg.PortableInterceptor.*;
+import org.omg.PortableInterceptor.ORBInitInfoPackage.*;
 import org.omg.IOP.*;
 import org.omg.IOP.CodecFactoryPackage.*;
 
@@ -67,7 +67,7 @@
 
 	ThreadActionData.addSetup(new InterpositionThreadSetup());
     }
-  
+
     /**
      * @message com.arjuna.ats.internal.jts.orbspecific.jacorb.interceptors.interposition.codecerror {0} - a failure occured when getting {1} codec - unknown encoding.
      * @message com.arjuna.ats.internal.jts.orbspecific.jacorb.interceptors.interposition.duplicatename {0} - duplicate interceptor name for {1} when registering
@@ -92,7 +92,7 @@
 
 	OTSManager.setLocalSlotId(localSlot);
 	OTSManager.setReceivedSlotId(receivedSlot);
-	
+
 	/*
 	 * Get the CDR codec; used for encoding/decoding the service
 	 * context and IOR components.
@@ -122,9 +122,9 @@
 
 	    ex.printStackTrace();
 
-	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.jacorb.interceptors.interposition.codeccreate"));
+	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.jacorb.interceptors.interposition.codeccreate"), ex);
 	}
-    
+
 	/*
 	 * Register client interceptor to propogate the context.
 	 */
@@ -151,9 +151,9 @@
 
 	    ex.printStackTrace();
 
-	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.jacorb.interceptors.interposition.cie"));
+	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.jacorb.interceptors.interposition.cie"), ex);
 	}
-  
+
 	/*
 	 * Register a server interceptor to receive the context.
 	 */
@@ -180,10 +180,10 @@
 
 	    ex.printStackTrace();
 
-	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.jacorb.interceptors.interposition.sie"));
+	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.jacorb.interceptors.interposition.sie"), ex);
 	}
     }
-  
+
 public void post_init (ORBInitInfo init_info)
     {
 	if (jtsLogger.logger.isDebugEnabled())
@@ -194,5 +194,5 @@
 
 	// nothing to do
     }
-  
+
 }

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/javaidl/interceptors/context/ContextORBInitializerImpl.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/javaidl/interceptors/context/ContextORBInitializerImpl.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/javaidl/interceptors/context/ContextORBInitializerImpl.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,8 +1,8 @@
 /*
  * 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 
+ * 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
@@ -14,7 +14,7 @@
  * 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.
  */
@@ -24,7 +24,7 @@
  * Arjuna Solutions Limited,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: ContextORBInitializerImpl.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -48,8 +48,8 @@
 
 import org.omg.CosTransactions.*;
 import org.omg.CORBA.*;
-import org.omg.PortableInterceptor.*; 
-import org.omg.PortableInterceptor.ORBInitInfoPackage.*; 
+import org.omg.PortableInterceptor.*;
+import org.omg.PortableInterceptor.ORBInitInfoPackage.*;
 import org.omg.IOP.*;
 import org.omg.IOP.CodecFactoryPackage.*;
 
@@ -77,7 +77,7 @@
 
 	ThreadActionData.addSetup(new ContextThreadSetup());
     }
-  
+
     /**
      * @message com.arjuna.ats.internal.jts.orbspecific.javaidl.interceptors.context.codecerror {0} - a failure occured when getting {1} codec - unknown encoding.
      * @message com.arjuna.ats.internal.jts.orbspecific.javaidl.interceptors.context.duplicatename {0} - duplicate interceptor name for {1} when registering
@@ -86,13 +86,13 @@
      */
 
     public void pre_init (ORBInitInfo init_info)
-    {    
+    {
 	if (jtsLogger.logger.isDebugEnabled())
 	{
 	    jtsLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
 				   (com.arjuna.ats.jts.logging.FacilityCode.FAC_OTS | com.arjuna.ats.jts.logging.FacilityCode.FAC_INTERCEPTOR), "ContextORBInitializer.pre_init ()");
 	}
-	
+
 	/*
 	 * These value should be part of the standard.
 	 */
@@ -102,7 +102,7 @@
 
 	OTSManager.setLocalSlotId(localSlot);
 	OTSManager.setReceivedSlotId(receivedSlot);
-	
+
 	/*
 	 * Get the CDR codec; used for encoding/decoding the service
 	 * context and IOR components.
@@ -132,9 +132,9 @@
 
 	    ex.printStackTrace();
 
-	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.javaidl.interceptors.context.codeccreate"));
+	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.javaidl.interceptors.context.codeccreate"), ex);
 	}
-    
+
 	/*
 	 * Register client interceptor to propogate the context.
 	 */
@@ -161,9 +161,9 @@
 
 	    ex.printStackTrace();
 
-	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.javaidl.interceptors.context.cie"));
+	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.javaidl.interceptors.context.cie"), ex);
 	}
-  
+
 	/*
 	 * Register a server interceptor to receive the context.
 	 */
@@ -190,10 +190,10 @@
 
 	    ex.printStackTrace();
 
-	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.javaidl.interceptors.context.sie"));
+	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.javaidl.interceptors.context.sie"), ex);
 	}
     }
-  
+
     public void post_init (ORBInitInfo init_info)
     {
 	if (jtsLogger.logger.isDebugEnabled())
@@ -204,5 +204,5 @@
 
 	// nothing to do
     }
-  
+
 }

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/javaidl/interceptors/interposition/InterpositionORBInitializerImpl.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/javaidl/interceptors/interposition/InterpositionORBInitializerImpl.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/javaidl/interceptors/interposition/InterpositionORBInitializerImpl.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,8 +1,8 @@
 /*
  * 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 
+ * 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
@@ -14,7 +14,7 @@
  * 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.
  */
@@ -24,7 +24,7 @@
  * Hewlett-Packard Arjuna Labs,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: InterpositionORBInitializerImpl.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -48,8 +48,8 @@
 
 import org.omg.CosTransactions.*;
 import org.omg.CORBA.*;
-import org.omg.PortableInterceptor.*; 
-import org.omg.PortableInterceptor.ORBInitInfoPackage.*; 
+import org.omg.PortableInterceptor.*;
+import org.omg.PortableInterceptor.ORBInitInfoPackage.*;
 import org.omg.IOP.*;
 import org.omg.IOP.CodecFactoryPackage.*;
 
@@ -77,7 +77,7 @@
 
 	ThreadActionData.addSetup(new InterpositionThreadSetup());
     }
-  
+
     /**
      * @message com.arjuna.ats.internal.jts.orbspecific.javaidl.interceptors.interposition.codecerror {0} - a failure occured when getting {1} codec - unknown encoding.
      * @message com.arjuna.ats.internal.jts.orbspecific.javaidl.interceptors.interposition.duplicatename {0} - duplicate interceptor name for {1} when registering
@@ -102,7 +102,7 @@
 
 	OTSManager.setLocalSlotId(localSlot);
 	OTSManager.setReceivedSlotId(receivedSlot);
-	
+
 	/*
 	 * Get the CDR codec; used for encoding/decoding the service
 	 * context and IOR components.
@@ -132,9 +132,9 @@
 
 	    ex.printStackTrace();
 
-	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.javaidl.interceptors.interposition.codeccreate"));
+	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.javaidl.interceptors.interposition.codeccreate"), ex);
 	}
-    
+
 	/*
 	 * Register client interceptor to propogate the context.
 	 */
@@ -161,9 +161,9 @@
 
 	    ex.printStackTrace();
 
-	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.javaidl.interceptors.interposition.cie"));
+	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.javaidl.interceptors.interposition.cie"), ex);
 	}
-  
+
 	/*
 	 * Register a server interceptor to receive the context.
 	 */
@@ -190,10 +190,10 @@
 
 	    ex.printStackTrace();
 
-	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.javaidl.interceptors.interposition.sie"));
+	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.javaidl.interceptors.interposition.sie"), ex);
 	}
     }
-  
+
 public void post_init (ORBInitInfo init_info)
     {
 	if (jtsLogger.logger.isDebugEnabled())
@@ -204,5 +204,5 @@
 
 	// nothing to do
     }
-  
+
 }

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/orbix2000/interceptors/context/ContextORBInitializerImpl.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/orbix2000/interceptors/context/ContextORBInitializerImpl.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/orbix2000/interceptors/context/ContextORBInitializerImpl.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,8 +1,8 @@
 /*
  * 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 
+ * 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
@@ -14,7 +14,7 @@
  * 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.
  */
@@ -24,7 +24,7 @@
  * Arjuna Solutions Limited,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: ContextORBInitializerImpl.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -45,8 +45,8 @@
 
 import org.omg.CosTransactions.*;
 import org.omg.CORBA.*;
-import org.omg.PortableInterceptor.*; 
-import org.omg.PortableInterceptor.ORBInitInfoPackage.*; 
+import org.omg.PortableInterceptor.*;
+import org.omg.PortableInterceptor.ORBInitInfoPackage.*;
 import org.omg.IOP.*;
 import org.omg.IOP.CodecFactoryPackage.*;
 
@@ -74,7 +74,7 @@
 
 	ThreadActionData.addSetup(new ContextThreadSetup());
     }
-  
+
     /**
      * @message com.arjuna.ats.internal.jts.orbspecific.orbix2000.interceptors.context.codecerror {0} - a failure occured when getting {1} codec - unknown encoding.
      * @message com.arjuna.ats.internal.jts.orbspecific.orbix2000.interceptors.context.duplicatename {0} - duplicate interceptor name for {1} when registering
@@ -83,13 +83,13 @@
      */
 
     public void pre_init (ORBInitInfo init_info)
-    {    
+    {
 	if (jtsLogger.logger.isDebugEnabled())
 	{
 	    jtsLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
 				   (com.arjuna.ats.jts.logging.FacilityCode.FAC_OTS | com.arjuna.ats.jts.logging.FacilityCode.FAC_INTERCEPTOR), "ContextORBInitializer.pre_init ()");
 	}
-	
+
 	/*
 	 * These value should be part of the standard.
 	 */
@@ -99,7 +99,7 @@
 
 	com.arjuna.ats.jts.OTSManager.setLocalSlotId(localSlot);
 	com.arjuna.ats.jts.OTSManager.setReceivedSlotId(receivedSlot);
-	
+
 	/*
 	 * Get the CDR codec; used for encoding/decoding the service
 	 * context and IOR components.
@@ -129,9 +129,9 @@
 
 	    ex.printStackTrace();
 
-	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.orbix2000.interceptors.context.codeccreate"));
+	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.orbix2000.interceptors.context.codeccreate"), ex);
 	}
-    
+
 	/*
 	 * Register client interceptor to propogate the context.
 	 */
@@ -158,9 +158,9 @@
 
 	    ex.printStackTrace();
 
-	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.orbix2000.interceptors.context.cie"));
+	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.orbix2000.interceptors.context.cie"), ex);
 	}
-  
+
 	/*
 	 * Register a server interceptor to receive the context.
 	 */
@@ -187,10 +187,10 @@
 
 	    ex.printStackTrace();
 
-	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.orbix2000.interceptors.context.sie"));
+	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.orbix2000.interceptors.context.sie"), ex);
 	}
     }
-  
+
     public void post_init (ORBInitInfo init_info)
     {
 	if (jtsLogger.logger.isDebugEnabled())
@@ -201,5 +201,5 @@
 
 	// nothing to do
     }
-  
+
 }

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/orbix2000/interceptors/interposition/InterpositionORBInitializerImpl.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/orbix2000/interceptors/interposition/InterpositionORBInitializerImpl.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/orbspecific/orbix2000/interceptors/interposition/InterpositionORBInitializerImpl.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,8 +1,8 @@
 /*
  * 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 
+ * 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
@@ -14,7 +14,7 @@
  * 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.
  */
@@ -24,7 +24,7 @@
  * Hewlett-Packard Arjuna Labs,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: InterpositionORBInitializerImpl.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -45,8 +45,8 @@
 
 import org.omg.CosTransactions.*;
 import org.omg.CORBA.*;
-import org.omg.PortableInterceptor.*; 
-import org.omg.PortableInterceptor.ORBInitInfoPackage.*; 
+import org.omg.PortableInterceptor.*;
+import org.omg.PortableInterceptor.ORBInitInfoPackage.*;
 import org.omg.IOP.*;
 import org.omg.IOP.CodecFactoryPackage.*;
 
@@ -74,7 +74,7 @@
 
 	ThreadActionData.addSetup(new InterpositionThreadSetup());
     }
-  
+
     /**
      * @message com.arjuna.ats.internal.jts.orbspecific.orbix2000.interceptors.interposition.codecerror {0} - a failure occured when getting {1} codec - unknown encoding.
      * @message com.arjuna.ats.internal.jts.orbspecific.orbix2000.interceptors.interposition.duplicatename {0} - duplicate interceptor name for {1} when registering
@@ -99,7 +99,7 @@
 
 	com.arjuna.ats.jts.OTSManager.setLocalSlotId(localSlot);
 	com.arjuna.ats.jts.OTSManager.setReceivedSlotId(receivedSlot);
-	
+
 	/*
 	 * Get the CDR codec; used for encoding/decoding the service
 	 * context and IOR components.
@@ -129,9 +129,9 @@
 
 	    ex.printStackTrace();
 
-	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.orbix2000.interceptors.interposition.codeccreate"));
+	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.orbix2000.interceptors.interposition.codeccreate"), ex);
 	}
-    
+
 	/*
 	 * Register client interceptor to propogate the context.
 	 */
@@ -158,9 +158,9 @@
 
 	    ex.printStackTrace();
 
-	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.orbix2000.interceptors.interposition.cie"));
+	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.orbix2000.interceptors.interposition.cie"), ex);
 	}
-  
+
 	/*
 	 * Register a server interceptor to receive the context.
 	 */
@@ -187,10 +187,10 @@
 
 	    ex.printStackTrace();
 
-	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.orbix2000.interceptors.interposition.sie"));
+	    throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.orbix2000.interceptors.interposition.sie"), ex);
 	}
     }
-  
+
 public void post_init (ORBInitInfo init_info)
     {
 	if (jtsLogger.logger.isDebugEnabled())
@@ -201,5 +201,5 @@
 
 	// nothing to do
     }
-  
+
 }

Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/thread/OTSThread.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/thread/OTSThread.java	2009-05-07 08:59:17 UTC (rev 26415)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/jts/thread/OTSThread.java	2009-05-07 09:51:30 UTC (rev 26416)
@@ -1,8 +1,8 @@
 /*
  * 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 
+ * 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
@@ -14,7 +14,7 @@
  * 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.
  */
@@ -24,7 +24,7 @@
  * Hewlett-Packard Arjuna Labs,
  * Newcastle upon Tyne,
  * Tyne and Wear,
- * UK.  
+ * UK.
  *
  * $Id: OTSThread.java 2342 2006-03-30 13:06:17Z  $
  */
@@ -63,7 +63,7 @@
      * Can't use finalize since it may be called by
      * some other thread than this one.
      */
-    
+
     public void terminate ()
     {
 	try
@@ -109,13 +109,13 @@
 					      new Object[] { "OTSThread.run", e} );
 		}
 
-		throw new FatalError("OTSThread.run - "+jtsLogger.logMesg.getString("com.arjuna.ats.jts.thread.resumefailederror"+e));
+		throw new FatalError("OTSThread.run - "+jtsLogger.logMesg.getString("com.arjuna.ats.jts.thread.resumefailederror"+e), e);
 	    }
 
 	    _currentControl = null;
 	}
     }
-    
+
     protected OTSThread ()
     {
 	try
@@ -135,5 +135,5 @@
     }
 
     private Control _currentControl;
-    
+
 }




More information about the jboss-svn-commits mailing list