[jboss-svn-commits] JBL Code SVN: r33266 - in labs/jbosstm/trunk/ArjunaCore/arjuna: classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc and 3 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon May 31 15:21:36 EDT 2010


Author: mark.little at jboss.com
Date: 2010-05-31 15:21:35 -0400 (Mon, 31 May 2010)
New Revision: 33266

Added:
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/JDBCObjectStoreTest.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockAccessor.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockBlob.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockConnection.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockDriver.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockIBMDriver.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockJConnectDriver.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockMSFTDriver.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockMySqlDriver.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockOracleDriver.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockPostgresDriver.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockPreparedStatement.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockResultSet.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockStatement.java
Modified:
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/CacheStore.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/JDBCImple.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/microsoft_driver.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/oracle_driver.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/ObjectStoreTest.java
Log:
https://jira.jboss.org/browse/JBTM-698

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/CacheStore.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/CacheStore.java	2010-05-31 18:19:25 UTC (rev 33265)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/CacheStore.java	2010-05-31 19:21:35 UTC (rev 33266)
@@ -425,53 +425,56 @@
             elements = null;
         }
 
+        int status = NOT_PRESENT;
+        
         if (elements == null)
-            return NOT_PRESENT;
+            return status;
 
-        int status = NOT_PRESENT;
-
-        for (int i = 0; i < elements.length; i++)
+        synchronized (elements)
         {
-            StoreElement element = (StoreElement) elements[i];
-
-            if ((element != null) && !element.removed
-                    && element.objUid.equals(objUid))
+            for (int i = 0; i < elements.length; i++)
             {
-                switch (element.typeOfWork)
+                StoreElement element = (StoreElement) elements[i];
+    
+                if ((element != null) && !element.removed
+                        && element.objUid.equals(objUid))
                 {
-                case AsyncStore.REMOVE:
-                    element.remove();
-
-                    synchronized (_workList)
+                    switch (element.typeOfWork)
                     {
-                        _removedItems++;
-                    }
-
-                    if (status != IN_USE)
-                        status = REMOVED;
-
-                    break;
-                case AsyncStore.WRITE:
-                    // if (element.fileType == ft)
-                {
-                    synchronized (_workList)
+                    case AsyncStore.REMOVE:
+                        element.remove();
+    
+                        synchronized (_workList)
+                        {
+                            _removedItems++;
+                        }
+    
+                        if (status != IN_USE)
+                            status = REMOVED;
+    
+                        break;
+                    case AsyncStore.WRITE:
+                        // if (element.fileType == ft)
                     {
-                        if (element.state != null)
-                            _currentCacheSize -= element.state.size();
-
-                        _removedItems++;
+                        synchronized (_workList)
+                        {
+                            if (element.state != null)
+                                _currentCacheSize -= element.state.size();
+    
+                            _removedItems++;
+                        }
+    
+                        element.remove();
+    
+                        if (status != IN_USE)
+                            status = REMOVED;
                     }
-
-                    element.remove();
-
-                    if (status != IN_USE)
-                        status = REMOVED;
+    
+                        break;
+                    default:
+                        break;
+                    }
                 }
-
-                    break;
-                default:
-                    break;
-                }
             }
         }
 
@@ -603,9 +606,7 @@
             {
                 StoreElement element = (StoreElement) list.get(i);
 
-                if ((element != null) && !element.removed
-                        && (element.objUid.equals(objUid)))
-                    ;
+                if ((element != null) && !element.removed && (element.objUid.equals(objUid)))
                 {
                     if (element.fileType == ft)
                         return element.state;
@@ -616,8 +617,11 @@
              * If not in cache then maybe we're working on it?
              */
 
-            if ((_work != null) && (objUid.equals(_work.objUid)))
-                return _work.state;
+            synchronized (_workList)
+            {
+                if ((_work != null) && (objUid.equals(_work.objUid)))
+                    return _work.state;
+            }
         }
 
         return null;
@@ -676,11 +680,14 @@
     {
         try
         {
-            if (_work != null)
+            synchronized (_workList)
             {
-                if (_work.objUid.equals(objUid) && (_work.fileType == ft))
+                if (_work != null)
                 {
-                    return true;
+                    if (_work.objUid.equals(objUid) && (_work.fileType == ft))
+                    {
+                        return true;
+                    }
                 }
             }
         }

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/JDBCImple.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/JDBCImple.java	2010-05-31 18:19:25 UTC (rev 33265)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/JDBCImple.java	2010-05-31 19:21:35 UTC (rev 33266)
@@ -33,7 +33,6 @@
 
 import com.arjuna.ats.arjuna.state.*;
 import com.arjuna.ats.arjuna.logging.tsLogger;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
 import com.arjuna.ats.arjuna.objectstore.StateStatus;
 import com.arjuna.ats.arjuna.objectstore.StateType;
 import com.arjuna.ats.arjuna.common.*;
@@ -133,6 +132,11 @@
 			}
 			catch (Throwable e)
 			{
+			    e.printStackTrace();
+			    
+			    if (true)
+			        return false;
+			    
 				cleanup = false;
 				if (retryConnection(e, pool))
 				{
@@ -387,7 +391,7 @@
 									+ " WHERE UidString = ? AND TypeName = ?");
 					_preparedStatements[pool][CURRENT_STATE] = pstmt;
 				}
-
+				
 				pstmt.setString(1, objUid.stringForm());
 				pstmt.setString(2, typeName);
 
@@ -405,7 +409,6 @@
 
 				while (rs.next())
 				{
-
 					int stateStatus = rs.getInt(1);
 
 					switch (stateStatus)
@@ -461,11 +464,16 @@
 				}
 				else
 				{
+				    if (tsLogger.arjLoggerI18N.isWarnEnabled())
+				    {
 					tsLogger.arjLoggerI18N
 							.warn(
 									"com.arjuna.ats.internal.arjuna.objectstore.JDBCImple_3",
 									new Object[]
 									{ e });
+					
+					e.printStackTrace();
+				    }
 
 					return StateStatus.OS_UNKNOWN;
 				}
@@ -883,7 +891,7 @@
 					pstmt.setInt(3, ft);
 
 					rs = pstmt.executeQuery();
-
+					
 					if(! rs.next()) {
 						return null; // no matching state in db
 					}
@@ -901,6 +909,8 @@
 				}
 				catch (Throwable e)
 				{
+				    e.printStackTrace();
+				    
 					if(retryConnection(e, pool)) {
 						return read_state(objUid, tName, ft, tableName);
 					} else {
@@ -1194,6 +1204,7 @@
 	 *          [com.arjuna.ats.internal.arjuna.objectstore.JDBCImple_14] -
 	 *          getState caught exception: {0}
 	 */
+    
 	protected final int getState(String state)
 	{
 		try

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/microsoft_driver.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/microsoft_driver.java	2010-05-31 18:19:25 UTC (rev 33265)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/microsoft_driver.java	2010-05-31 19:21:35 UTC (rev 33266)
@@ -37,18 +37,10 @@
 
 package com.arjuna.ats.internal.arjuna.objectstore.jdbc;
 
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Statement;
 
-import com.arjuna.ats.arjuna.common.Uid;
-import com.arjuna.ats.arjuna.state.InputObjectState;
-import com.arjuna.ats.arjuna.state.OutputObjectState;
-import com.arjuna.ats.arjuna.objectstore.ObjectStore;
 import com.arjuna.ats.internal.arjuna.objectstore.JDBCImple;
-import com.arjuna.ats.arjuna.logging.tsLogger;
-import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
 
 /**
  * JDBC store implementation driver-specific code.

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/oracle_driver.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/oracle_driver.java	2010-05-31 18:19:25 UTC (rev 33265)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/oracle_driver.java	2010-05-31 19:21:35 UTC (rev 33266)
@@ -56,244 +56,298 @@
 import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
 
 /**
- * @message com.arjuna.ats.internal.arjuna.objectstore.jdbc.oracle_1 [com.arjuna.ats.internal.arjuna.objectstore.jdbc.oracle_1] - oracle:read_state failed
- * @message com.arjuna.ats.internal.arjuna.objectstore.jdbc.oracle_2 [com.arjuna.ats.internal.arjuna.objectstore.jdbc.oracle_2] - oracle:write_state caught exception: {0}
+ * @message com.arjuna.ats.internal.arjuna.objectstore.jdbc.oracle_1
+ *          [com.arjuna.ats.internal.arjuna.objectstore.jdbc.oracle_1] -
+ *          oracle:read_state failed
+ * @message com.arjuna.ats.internal.arjuna.objectstore.jdbc.oracle_2
+ *          [com.arjuna.ats.internal.arjuna.objectstore.jdbc.oracle_2] -
+ *          oracle:write_state caught exception: {0}
  */
 
 public class oracle_driver extends JDBCImple
 {
-    private static final int MAX_RETRIES = 10 ;
+    private static final int MAX_RETRIES = 10;
 
-	public InputObjectState read_state (Uid objUid, String tName, int ft, String tableName) throws ObjectStoreException
-	{
-		InputObjectState newImage = null;
+    public InputObjectState read_state (Uid objUid, String tName, int ft,
+            String tableName) throws ObjectStoreException
+    {
+        if (!storeValid())
+            return null;
 
-		if (!storeValid())
-			return newImage;
+        InputObjectState newImage = null;
 
-		if (tName != null)
-		{
-			if ((ft == StateStatus.OS_COMMITTED) || (ft == StateStatus.OS_UNCOMMITTED))
-			{
-				int pool = getPool();
-				ResultSet rs = null;
+        if (tName != null)
+        {
+            if ((ft == StateStatus.OS_COMMITTED)
+                    || (ft == StateStatus.OS_UNCOMMITTED))
+            {
+                int pool = getPool();
+                ResultSet rs = null;
 
                 try
                 {
-                    for(int count = 0 ; count < MAX_RETRIES ; count++)
+                    for (int count = 0; count < MAX_RETRIES; count++)
                     {
-        				try
-        				{
-        					PreparedStatement pstmt = _preparedStatements[pool][READ_STATE];
+                        try
+                        {
+                            PreparedStatement pstmt = _preparedStatements[pool][READ_STATE];
 
-        					if (pstmt == null)
-        					{
-        						pstmt = _theConnection[pool].prepareStatement("SELECT ObjectState FROM "+tableName+" WHERE UidString = ? AND TypeName = ? AND StateType = ?");
+                            if (pstmt == null)
+                            {
+                                pstmt = _theConnection[pool]
+                                        .prepareStatement("SELECT ObjectState FROM "
+                                                + tableName
+                                                + " WHERE UidString = ? AND TypeName = ? AND StateType = ?");
 
-        						_preparedStatements[pool][READ_STATE] = pstmt;
-        					}
+                                _preparedStatements[pool][READ_STATE] = pstmt;
+                            }
 
-        					pstmt.setString(1, objUid.stringForm());
-        					pstmt.setString(2, tName);
-        					pstmt.setInt(3, ft);
+                            pstmt.setString(1, objUid.stringForm());
+                            pstmt.setString(2, tName);
+                            pstmt.setInt(3, ft);
 
-        					rs = pstmt.executeQuery();
+                            rs = pstmt.executeQuery();
 
-        					if(! rs.next()) {
-        						return null; // no matching state in db
-        					}
+                            if (!rs.next())
+                            {
+                                return null; // no matching state in db
+                            }
 
-        					Blob myBlob = (Blob)rs.getBlob(1);
-        					byte[] buffer = myBlob.getBytes(1, (int)myBlob.length());
+                            Blob myBlob = (Blob) rs.getBlob(1);
+                            byte[] buffer = myBlob.getBytes(1, (int) myBlob
+                                    .length());
 
-        					if (buffer != null)
-        					{
-        						newImage = new InputObjectState(objUid, tName, buffer);
-        					}
-        					else {
-        					    if (tsLogger.arjLoggerI18N.isWarnEnabled())
-        						tsLogger.arjLoggerI18N.warn("com.arjuna.ats.internal.arjuna.objectstore.jdbc.oracle_1");
-        					}
+                            if (buffer != null)
+                            {
+                                newImage = new InputObjectState(objUid, tName,
+                                        buffer);
+                            }
+                            else
+                            {
+                                if (tsLogger.arjLoggerI18N.isWarnEnabled())
+                                    tsLogger.arjLoggerI18N
+                                            .warn("com.arjuna.ats.internal.arjuna.objectstore.jdbc.oracle_1");
+                            }
 
                             return newImage;
-        				}
-        				catch (Throwable e)
-        				{
-                            if (count == MAX_RETRIES-1)
+                        }
+                        catch (Throwable e)
+                        {
+                            if (count == MAX_RETRIES - 1)
                             {
                                 throw new ObjectStoreException(e.toString(), e);
                             }
                             try
                             {
-                                reconnect(pool) ;
+                                reconnect(pool);
                             }
                             catch (final Throwable th)
                             {
                                 throw new ObjectStoreException(e.toString(), th);
                             }
-        				}
+                        }
                     }
                 }
-				finally
-				{
-					try
-					{
-						if (rs != null)
-							rs.close();
-					}
-					// Ignore
-					catch (Exception re) {}
-					freePool(pool);
-				}
-			}
+                finally
+                {
+                    try
+                    {
+                        if (rs != null)
+                            rs.close();
+                    }
+                    // Ignore
+                    catch (Exception re)
+                    {
+                    }
+                    freePool(pool);
+                }
+            }
             return newImage;
-		}
-		else
-			throw new ObjectStoreException("oracle.read_state - object with uid "+objUid+" has no TypeName");
-	}
+        }
+        else
+            throw new ObjectStoreException(
+                    "oracle.read_state - object with uid " + objUid
+                            + " has no TypeName");
+    }
 
+    public boolean write_state (Uid objUid, String tName,
+            OutputObjectState state, int stateType, String tableName)
+            throws ObjectStoreException
+    {
+        int imageSize = (int) state.length();
 
-	public boolean write_state (Uid objUid, String tName, OutputObjectState state, int s, String tableName) throws ObjectStoreException
-	{
-		int imageSize = (int) state.length();
+        if (imageSize > getMaxStateSize())
+            throw new ObjectStoreException(
+                    "Object state is too large - maximum size allowed: "
+                            + getMaxStateSize());
 
-		if (imageSize > getMaxStateSize())
-			throw new ObjectStoreException("Object state is too large - maximum size allowed: " + getMaxStateSize());
+        byte[] b = state.buffer();
 
-		byte[] b = state.buffer();
+        if (imageSize > 0 && storeValid())
+        {
+            int pool = getPool();
+            ResultSet rs = null;
+            ResultSet rs3 = null;
 
-		if (imageSize > 0 && storeValid())
-		{
-			int pool = getPool();
-			ResultSet rs = null;
-			ResultSet rs3 = null;
-
             try
             {
-                for(int count = 0 ; count < MAX_RETRIES ; count++)
+                for (int count = 0; count < MAX_RETRIES; count++)
                 {
-        			try
-        			{
-        				PreparedStatement pstmt = _preparedStatements[pool][READ_WRITE_SHORTCUT];
+                    try
+                    {
+                        PreparedStatement pstmt = _preparedStatements[pool][READ_WRITE_SHORTCUT];
 
-        				_theConnection[pool].setAutoCommit(false);
+                        _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);
+                            
+                            _preparedStatements[pool][READ_WRITE_SHORTCUT] = pstmt;
+                        }
+                        pstmt.setString(1, objUid.stringForm());
+                        pstmt.setInt(2, stateType);
+                        pstmt.setString(3, tName);
 
-        				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);
-        					_preparedStatements[pool][READ_WRITE_SHORTCUT] = pstmt;
-        				}
-        				pstmt.setString(1, objUid.stringForm());
-        				pstmt.setInt(2, s);
-        				pstmt.setString(3, tName);
+                        rs = pstmt.executeQuery();
 
-        				rs = pstmt.executeQuery();
+                        if (rs.next())
+                        {
 
-        				if( rs.next() ) {
+                            Blob myBlob = rs.getBlob(1);
+                            myBlob.setBytes(1, b);
 
-        					Blob myBlob = rs.getBlob(1);
-        					myBlob.setBytes(1, b);
+                        }
+                        else
+                        {
+                            // not in database, do insert:
+                            PreparedStatement pstmt2 = _preparedStatements[pool][WRITE_STATE_NEW];
 
-        				} 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())");
 
-        					if (pstmt2 == null)
-        					{
-        						pstmt2 = _theConnection[pool].prepareStatement("INSERT INTO "+tableName+" (StateType,TypeName,UidString,ObjectState) VALUES (?,?,?,empty_blob())");
+                                _preparedStatements[pool][WRITE_STATE_NEW] = pstmt2;
+                            }
 
-        						_preparedStatements[pool][WRITE_STATE_NEW] = pstmt2;
-        					}
+                            pstmt2.setInt(1, stateType);
+                            pstmt2.setString(2, tName);
+                            pstmt2.setString(3, objUid.stringForm());
 
-        					pstmt2.setInt(1, s);
-        					pstmt2.setString(2, tName);
-        					pstmt2.setString(3, objUid.stringForm());
+                            pstmt2.executeUpdate();
+                            _theConnection[pool].commit();
 
-        					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;
+                            }
 
-        					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, stateType);
+                            
+                            rs3 = pstmt3.executeQuery();
+                            rs3.next();
+                            Blob myBlob = rs3.getBlob(1);
+                            myBlob.setBytes(1, b);
+                        }
 
-        					pstmt3.setString(1, objUid.stringForm());
-        					pstmt3.setString(2, tName);
-        					pstmt3.setInt(3, s);
-
-        					rs3 = pstmt3.executeQuery();
-        					rs3.next();
-        					Blob myBlob = rs3.getBlob(1);
-        					myBlob.setBytes(1, b);
-        				}
-
-        				_theConnection[pool].commit();
-                        return true ;
-
-        			}
-        			catch(Throwable e)
-        			{
-                        if (count == MAX_RETRIES-1)
+                        _theConnection[pool].commit();
+                        
+                        return true;
+                    }
+                    catch (Throwable e)
+                    {
+                        if (count == MAX_RETRIES - 1)
                         {
-                            if (tsLogger.arjLoggerI18N.isWarnEnabled()) {
-                                tsLogger.arjLoggerI18N.warn("com.arjuna.ats.internal.arjuna.objectstore.jdbc.oracle_2", new Object[] {e});
+                            if (tsLogger.arjLoggerI18N.isWarnEnabled())
+                            {
+                                tsLogger.arjLoggerI18N
+                                        .warn(
+                                                "com.arjuna.ats.internal.arjuna.objectstore.jdbc.oracle_2",
+                                                new Object[]
+                                                { e });
                             }
-                            return false ;
+                            return false;
                         }
                         try
                         {
-                            reconnect(pool) ;
+                            reconnect(pool);
                         }
                         catch (final Throwable th)
                         {
                             throw new ObjectStoreException(e.toString(), th);
                         }
-        			}
+                    }
                 }
             }
-			finally
-			{
-				try
-				{
-					_theConnection[pool].setAutoCommit(true);
-				}
-				catch(Exception e) {}
-				try
-				{
-					if (rs != null)
-						rs.close();
-				}
-				// Ignore
-				catch (Exception re) {
-				}
-				try
-				{
-					if (rs3 != null)
-						rs3.close();
-				}
-				// Ignore
-				catch (Exception re3) {
-				}
-				freePool(pool);
-			}
-		}
-		return false ;
-	}
+            finally
+            {
+                try
+                {
+                    _theConnection[pool].setAutoCommit(true);
+                }
+                catch (Exception e)
+                {
+                }
+                try
+                {
+                    if (rs != null)
+                        rs.close();
+                }
+                // Ignore
+                catch (Exception re)
+                {
+                }
+                try
+                {
+                    if (rs3 != null)
+                        rs3.close();
+                }
+                // Ignore
+                catch (Exception re3)
+                {
+                }
+                freePool(pool);
+            }
+        }
+        return false;
+    }
 
-	protected void createTable (Statement stmt, String tableName) throws SQLException
-	{
-		stmt.executeUpdate("CREATE TABLE "+tableName+" (StateType INTEGER, TypeName VARCHAR(1024),UidString VARCHAR(255), ObjectState BLOB, CONSTRAINT "+tableName+"_pk PRIMARY KEY(UidString, StateType, TypeName))");
-	}
+    protected void createTable (Statement stmt, String tableName)
+            throws SQLException
+    {
+        stmt
+                .executeUpdate("CREATE TABLE "
+                        + tableName
+                        + " (StateType INTEGER, TypeName VARCHAR(1024),UidString VARCHAR(255), ObjectState BLOB, CONSTRAINT "
+                        + tableName
+                        + "_pk PRIMARY KEY(UidString, StateType, TypeName))");
+    }
 
-	public String name ()
-	{
-		return "oracle";
-	}
+    public String name ()
+    {
+        return "oracle";
+    }
 
-    protected int getMaxStateSize()
+    protected int getMaxStateSize ()
     {
-        // Oracle BLOBs should be OK up to > 4 GB, but cap @ 10 MB for testing/performance:
+        // Oracle BLOBs should be OK up to > 4 GB, but cap @ 10 MB for
+        // testing/performance:
         return 1024 * 1024 * 10;
     }
 }

Added: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/JDBCObjectStoreTest.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/JDBCObjectStoreTest.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/JDBCObjectStoreTest.java	2010-05-31 19:21:35 UTC (rev 33266)
@@ -0,0 +1,333 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.hp.mwtests.ts.arjuna.objectstore;
+
+import java.sql.SQLException;
+
+import org.junit.Test;
+
+import com.arjuna.ats.arjuna.common.Uid;
+import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
+import com.arjuna.ats.arjuna.objectstore.StateStatus;
+import com.arjuna.ats.arjuna.objectstore.jdbc.JDBCAccess;
+import com.arjuna.ats.arjuna.state.OutputObjectState;
+import com.arjuna.ats.internal.arjuna.objectstore.JDBCImple;
+import com.arjuna.ats.internal.arjuna.objectstore.jdbc.accessors.accessor;
+import com.hp.mwtests.ts.arjuna.resources.mock.MockAccessor;
+import com.hp.mwtests.ts.arjuna.resources.mock.MockConnection;
+import com.hp.mwtests.ts.arjuna.resources.mock.MockDriver;
+import com.hp.mwtests.ts.arjuna.resources.mock.MockIBMDriver;
+import com.hp.mwtests.ts.arjuna.resources.mock.MockJConnectDriver;
+import com.hp.mwtests.ts.arjuna.resources.mock.MockMSFTDriver;
+import com.hp.mwtests.ts.arjuna.resources.mock.MockMySqlDriver;
+import com.hp.mwtests.ts.arjuna.resources.mock.MockOracleDriver;
+import com.hp.mwtests.ts.arjuna.resources.mock.MockPostgresDriver;
+import com.hp.mwtests.ts.arjuna.resources.mock.MockStatement;
+
+import static org.junit.Assert.*;
+
+
+public class JDBCObjectStoreTest
+{
+    @Test
+    public void testJDBCImple () throws SQLException, ObjectStoreException, Exception
+    {
+        MockDriver imple = new MockDriver();
+        
+        assertFalse(imple.storeValid());
+        
+        imple.setValid(true);
+        
+        assertTrue(imple.initialise(new MockConnection(), new MockAccessor(), "tableName"));
+        
+        imple.setState(StateStatus.OS_UNCOMMITTED);
+        
+        assertTrue(imple.commit_state(new Uid(), "typeName", "tableName"));
+        
+        try
+        {
+            assertFalse(imple.commit_state(new Uid(), null, "tableName"));
+            
+            fail();
+        }
+        catch (final Exception ex)
+        {
+        }
+        
+        imple.setValid(false);
+        
+        assertFalse(imple.commit_state(new Uid(), "typeName", "tableName"));
+        
+        imple.setValid(true);
+        
+        assertTrue(imple.hide_state(new Uid(), "typeName", "tableName"));
+        
+        imple.setState(StateStatus.OS_UNKNOWN);
+        
+        assertFalse(imple.hide_state(new Uid(), "typeName", "tableName"));
+        
+        imple.setState(StateStatus.OS_COMMITTED);
+        
+        assertTrue(imple.hide_state(new Uid(), "typeName", "tableName"));
+        
+        imple.setValid(false);
+        
+        assertFalse(imple.hide_state(new Uid(), "typeName", "tableName"));
+        
+        imple.setValid(true);
+        
+        assertTrue(imple.reveal_state(new Uid(), "typeName", "tableName"));
+        
+        imple.setState(StateStatus.OS_UNKNOWN);
+        
+        assertFalse(imple.reveal_state(new Uid(), "typeName", "tableName"));
+        
+        imple.setState(StateStatus.OS_COMMITTED_HIDDEN);
+        
+        assertTrue(imple.reveal_state(new Uid(), "typeName", "tableName"));
+        
+        imple.setState(StateStatus.OS_UNCOMMITTED_HIDDEN);
+        
+        assertTrue(imple.reveal_state(new Uid(), "typeName", "tableName"));
+        
+        imple.setValid(false);
+        
+        assertFalse(imple.reveal_state(new Uid(), "typeName", "tableName"));
+        
+        imple.setState(StateStatus.OS_COMMITTED);
+        
+        assertFalse(imple.remove_state(new Uid(), "name", StateStatus.OS_COMMITTED, "tableName"));
+        
+        imple.setValid(true);
+        
+        assertTrue(imple.remove_state(new Uid(), "name", StateStatus.OS_COMMITTED, "tableName"));
+        
+        imple.setState(StateStatus.OS_UNKNOWN);
+        
+        assertTrue(imple.remove_state(new Uid(), "name", StateStatus.OS_COMMITTED, "tableName"));
+        
+        assertFalse(imple.remove_state(new Uid(), "name", StateStatus.OS_UNKNOWN, "tableName"));
+        
+        assertFalse(imple.remove_state(new Uid(), null, StateStatus.OS_UNKNOWN, "tableName"));
+        
+        imple.setValid(false);
+        
+        assertTrue(imple.read_state(new Uid(), "tName", StateStatus.OS_COMMITTED, "tableName") == null);
+        
+        imple.setValid(true);
+        
+        try
+        {
+            assertTrue(imple.read_state(new Uid(), null, StateStatus.OS_COMMITTED, "tableName") == null);
+            
+            fail();
+        }
+        catch (final Exception ex)
+        {
+        }
+        
+        imple.setState(StateStatus.OS_COMMITTED);
+        
+        assertTrue(imple.read_state(new Uid(), "tName", StateStatus.OS_COMMITTED, "tableName") == null);
+        
+        assertTrue(imple.write_state(new Uid(), "tName", new OutputObjectState(), StateStatus.OS_UNCOMMITTED, "tableName"));
+        
+        try
+        {
+            byte[] buff = new byte[imple.getMaxStateSize()+1];
+            
+            assertTrue(imple.write_state(new Uid(), "tName", new OutputObjectState(new Uid(), "tName", buff), StateStatus.OS_UNCOMMITTED, "tableName"));
+            
+            fail();
+        }
+        catch (final Exception ex)
+        {
+        }
+        
+        imple.setReadWriteShortcut(false);
+        
+        assertTrue(imple.write_state(new Uid(), "tName", new OutputObjectState(), StateStatus.OS_UNCOMMITTED, "tableName"));
+        
+        imple.addTable("tname");
+        
+        assertEquals(imple.getTheState("foo"), StateStatus.OS_UNKNOWN);
+        
+        imple.addToTheCache(null, StateStatus.OS_COMMITTED);
+        
+        imple.removeFromTheCache(null);
+        
+        assertFalse(imple.retryConnection(new ObjectStoreException(), 0));
+        
+        assertTrue(imple.retryConnection(new SQLException(), 0));
+        
+        imple.reconnect(0);
+    }
+    
+    @Test
+    public void testAccessor () throws SQLException
+    {
+        Object[] params = new Object[3];
+        
+        params[JDBCAccess.URL] = "foobar";
+        params[JDBCAccess.DROP_TABLE] = new Long(1);
+        params[JDBCAccess.TABLE_NAME] = "mytable";
+        
+        accessor a = new accessor();
+        
+        a.initialise(params);
+        
+        a.putConnection(null);
+        
+        try
+        {
+            a.getConnection();
+            
+            fail();
+        }
+        catch (final Exception ex)
+        {
+        }
+        
+        assertTrue(a.dropTable());
+        
+        assertEquals(a.tableName(), params[JDBCAccess.TABLE_NAME]);
+        
+        params[JDBCAccess.URL] = null;
+        
+        try
+        {
+            a.initialise(params);
+            
+            fail();
+        }
+        catch (final Throwable ex)
+        {
+        }
+        
+        params[JDBCAccess.DROP_TABLE] = 0;
+        
+        try
+        {
+            a.initialise(params);
+            
+            fail();
+        }
+        catch (final Throwable ex)
+        {
+        }
+    }
+    
+    @Test
+    public void testOracleDriver () throws SQLException, ObjectStoreException
+    {
+        MockOracleDriver drvr = new MockOracleDriver();
+        
+        drvr.createTable(new MockStatement(), "foobar");
+        
+        assertTrue(drvr.name() != null);
+        assertEquals(drvr.getMaxStateSize(), 1024 * 1024 * 10);   
+        
+        drvr.setValid(false);
+        
+        assertTrue(drvr.read_state(new Uid(), "foobar", StateStatus.OS_COMMITTED, "mytable") == null);
+        
+        drvr.setValid(true);
+        
+        assertTrue(drvr.read_state(new Uid(), "foobar", StateStatus.OS_COMMITTED, "mytable") == null);
+        
+        drvr.resetReadState();
+        
+        assertTrue(drvr.read_state(new Uid(), "foobar", StateStatus.OS_COMMITTED, "mytable") == null);
+        
+        byte[] buff = new byte[drvr.getMaxStateSize()+1];
+        
+        try
+        {
+            assertTrue(drvr.write_state(new Uid(), "foobar", new OutputObjectState(new Uid(), "foobar", buff), StateStatus.OS_COMMITTED, "mytable"));
+            
+            fail();
+        }
+        catch (final ObjectStoreException ex)
+        {
+        }
+        
+        assertTrue(drvr.write_state(new Uid(), "foobar", new OutputObjectState(), StateStatus.OS_COMMITTED, "mytable"));
+        
+        drvr.resetReadWriteShortcut();
+        
+        assertTrue(drvr.write_state(new Uid(), "foobar", new OutputObjectState(), StateStatus.OS_COMMITTED, "mytable"));
+    }
+    
+    @Test
+    public void testPostgresDriver () throws SQLException
+    {
+        MockPostgresDriver drvr = new MockPostgresDriver();
+        
+        drvr.createTable(new MockStatement(), "foobar");
+        
+        assertTrue(drvr.name() != null);
+        assertEquals(drvr.getMaxStateSize(), 65535);
+    }
+    
+    @Test
+    public void testMySqlDriver () throws SQLException
+    {
+        MockMySqlDriver drvr = new MockMySqlDriver();
+        
+        drvr.createTable(new MockStatement(), "foobar");
+        
+        assertTrue(drvr.name() != null);
+        assertEquals(drvr.getMaxStateSize(), 65535);
+    }
+    
+    @Test
+    public void testMSFTDriver () throws SQLException
+    {
+        MockMSFTDriver drvr = new MockMSFTDriver();
+        
+        drvr.createTable(new MockStatement(), "foobar");
+        
+        assertTrue(drvr.name() != null);
+        assertEquals(drvr.getMaxStateSize(), 65535);
+    }
+    
+    @Test
+    public void testJConnectDriver () throws SQLException
+    {
+        MockJConnectDriver drvr = new MockJConnectDriver();
+        
+        drvr.createTable(new MockStatement(), "foobar");
+        
+        assertTrue(drvr.name() != null);
+        assertEquals(drvr.getMaxStateSize(), 65535);
+    }
+    
+    @Test
+    public void testIBMDriver () throws SQLException
+    {
+        MockIBMDriver drvr = new MockIBMDriver();
+        
+        drvr.createTable(new MockStatement(), "foobar");
+        
+        assertTrue(drvr.name() != null);
+        assertEquals(drvr.getMaxStateSize(), 65535);
+    }
+}

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/ObjectStoreTest.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/ObjectStoreTest.java	2010-05-31 18:19:25 UTC (rev 33265)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/objectstore/ObjectStoreTest.java	2010-05-31 19:21:35 UTC (rev 33266)
@@ -475,6 +475,8 @@
         as.makeInvalid();
         
         assertFalse(as.storeValid());
+        
+        new NullActionStore("foo");
     }
 
     @Test

Added: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockAccessor.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockAccessor.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockAccessor.java	2010-05-31 19:21:35 UTC (rev 33266)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2004,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: SyncRecord.java 2342 2006-03-30 13:06:17Z  $
+ */
+
+package com.hp.mwtests.ts.arjuna.resources.mock;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+
+import com.arjuna.ats.internal.arjuna.objectstore.jdbc.accessors.accessor;
+
+
+public class MockAccessor extends accessor
+{
+    public Connection getConnection () throws SQLException
+    {
+        return new MockConnection();
+    }
+    
+    public boolean dropTable ()
+    {
+        return true;
+    }
+}
+

Added: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockBlob.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockBlob.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockBlob.java	2010-05-31 19:21:35 UTC (rev 33266)
@@ -0,0 +1,122 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2004,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: SyncRecord.java 2342 2006-03-30 13:06:17Z  $
+ */
+
+package com.hp.mwtests.ts.arjuna.resources.mock;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.sql.Blob;
+import java.sql.SQLException;
+
+
+public class MockBlob implements Blob
+{
+
+    @Override
+    public void free () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public InputStream getBinaryStream () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public InputStream getBinaryStream (long pos, long length)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public byte[] getBytes (long pos, int length) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public long length () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public long position (byte[] pattern, long start) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public long position (Blob pattern, long start) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public OutputStream setBinaryStream (long pos) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public int setBytes (long pos, byte[] bytes) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public int setBytes (long pos, byte[] bytes, int offset, int len)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public void truncate (long len) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+}
+

Added: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockConnection.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockConnection.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockConnection.java	2010-05-31 19:21:35 UTC (rev 33266)
@@ -0,0 +1,410 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2004,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: SyncRecord.java 2342 2006-03-30 13:06:17Z  $
+ */
+
+package com.hp.mwtests.ts.arjuna.resources.mock;
+
+import java.sql.Array;
+import java.sql.Blob;
+import java.sql.CallableStatement;
+import java.sql.Clob;
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.NClob;
+import java.sql.PreparedStatement;
+import java.sql.SQLClientInfoException;
+import java.sql.SQLException;
+import java.sql.SQLWarning;
+import java.sql.SQLXML;
+import java.sql.Savepoint;
+import java.sql.Statement;
+import java.sql.Struct;
+import java.util.Map;
+import java.util.Properties;
+
+public class MockConnection implements Connection
+{
+    @Override
+    public void clearWarnings () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void close () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void commit () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public Array createArrayOf (String typeName, Object[] elements)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Blob createBlob () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Clob createClob () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public NClob createNClob () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public SQLXML createSQLXML () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Statement createStatement () throws SQLException
+    {
+        return new MockStatement();
+    }
+
+    @Override
+    public Statement createStatement (int resultSetType,
+            int resultSetConcurrency) throws SQLException
+    {
+        return new MockStatement();
+    }
+
+    @Override
+    public Statement createStatement (int resultSetType,
+            int resultSetConcurrency, int resultSetHoldability)
+            throws SQLException
+    {
+        return new MockStatement();
+    }
+
+    @Override
+    public Struct createStruct (String typeName, Object[] attributes)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public boolean getAutoCommit () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public String getCatalog () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Properties getClientInfo () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getClientInfo (String name) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public int getHoldability () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public DatabaseMetaData getMetaData () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public int getTransactionIsolation () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public Map<String, Class<?>> getTypeMap () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public SQLWarning getWarnings () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public boolean isClosed () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean isReadOnly () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean isValid (int timeout) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public String nativeSQL (String sql) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public CallableStatement prepareCall (String sql) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public CallableStatement prepareCall (String sql, int resultSetType,
+            int resultSetConcurrency) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public CallableStatement prepareCall (String sql, int resultSetType,
+            int resultSetConcurrency, int resultSetHoldability)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public PreparedStatement prepareStatement (String sql) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public PreparedStatement prepareStatement (String sql, int autoGeneratedKeys)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public PreparedStatement prepareStatement (String sql, int[] columnIndexes)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public PreparedStatement prepareStatement (String sql, String[] columnNames)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public PreparedStatement prepareStatement (String sql, int resultSetType,
+            int resultSetConcurrency) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public PreparedStatement prepareStatement (String sql, int resultSetType,
+            int resultSetConcurrency, int resultSetHoldability)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public void releaseSavepoint (Savepoint savepoint) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void rollback () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void rollback (Savepoint savepoint) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setAutoCommit (boolean autoCommit) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setCatalog (String catalog) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setClientInfo (Properties properties)
+            throws SQLClientInfoException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setClientInfo (String name, String value)
+            throws SQLClientInfoException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setHoldability (int holdability) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setReadOnly (boolean readOnly) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public Savepoint setSavepoint () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Savepoint setSavepoint (String name) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public void setTransactionIsolation (int level) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setTypeMap (Map<String, Class<?>> map) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public boolean isWrapperFor (Class<?> iface) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public <T> T unwrap (Class<T> iface) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+}
+

Added: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockDriver.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockDriver.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockDriver.java	2010-05-31 19:21:35 UTC (rev 33266)
@@ -0,0 +1,141 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2004,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: SyncRecord.java 2342 2006-03-30 13:06:17Z  $
+ */
+
+package com.hp.mwtests.ts.arjuna.resources.mock;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+import java.sql.Statement;
+
+import com.arjuna.ats.arjuna.common.Uid;
+import com.arjuna.ats.arjuna.exceptions.ObjectStoreException;
+import com.arjuna.ats.arjuna.objectstore.StateStatus;
+import com.arjuna.ats.arjuna.objectstore.StateType;
+import com.arjuna.ats.arjuna.objectstore.jdbc.JDBCAccess;
+import com.arjuna.ats.internal.arjuna.objectstore.JDBCImple;
+import com.arjuna.ats.internal.arjuna.objectstore.jdbc.ibm_driver;
+
+public class MockDriver extends ibm_driver
+{   
+    public boolean initialise(Connection conn, JDBCAccess jdbcAccess, String tableName) throws SQLException
+    {
+        super.initialise(conn, jdbcAccess, tableName);
+        
+        super._poolSizeInit = 1;
+        super._inUse = new boolean[1];
+        super._theConnection = new Connection[1];
+        super._preparedStatements = new PreparedStatement[1][];
+        
+        super._preparedStatements[0] = new PreparedStatement[JDBCImple.STATEMENT_SIZE];
+        
+        super._preparedStatements[0][JDBCImple.READ_STATE] = new MockPreparedStatement(false);
+        super._preparedStatements[0][JDBCImple.READ_WRITE_SHORTCUT] = new MockPreparedStatement();
+        super._preparedStatements[0][JDBCImple.WRITE_STATE_NEW] = new MockPreparedStatement();
+        super._preparedStatements[0][JDBCImple.SELECT_FOR_WRITE_STATE] = new MockPreparedStatement();
+        super._preparedStatements[0][JDBCImple.PRECOMMIT_CLEANUP] = new MockPreparedStatement();
+        super._preparedStatements[0][JDBCImple.COMMIT_STATE] = new MockPreparedStatement();
+        super._preparedStatements[0][JDBCImple.CURRENT_STATE] = new MockPreparedStatement(false);
+        super._preparedStatements[0][JDBCImple.HIDE_STATE] = new MockPreparedStatement();
+        super._preparedStatements[0][JDBCImple.REVEAL_STATE] = new MockPreparedStatement();
+        super._preparedStatements[0][JDBCImple.REMOVE_STATE] = new MockPreparedStatement();
+        
+        super._inUse[0] = false;
+        super._theConnection[0] = new MockConnection();
+        
+        return true;
+    }
+    
+    public void setState (int state)
+    {
+        _state = state;
+    }
+    
+    public int currentState(Uid objUid, String typeName, String tableName) throws ObjectStoreException
+    {
+        super.currentState(objUid, typeName, tableName);
+        
+        return _state;
+    }
+    
+    public void setValid (boolean v)
+    {
+        super._isValid = v;
+    }
+    
+    public void setReadWriteShortcut (boolean res)
+    {
+        super._preparedStatements[0][JDBCImple.READ_WRITE_SHORTCUT] = new MockPreparedStatement(res);
+    }
+    
+    public void addTable(String tableName) throws Exception
+    {
+        super.addTable(tableName);
+    }
+    
+    public int getTheState(String state)
+    {
+        return super.getState(state);
+    }
+    
+    public void addToTheCache(Uid state, int status)
+    {
+        super.addToCache(state, status);
+    }
+    
+    public void removeFromTheCache(String state)
+    {
+        super.removeFromCache(state);
+    }
+    
+    public boolean retryConnection(Throwable e, int pool)
+    {
+        return super.retryConnection(e, pool);
+    }
+    
+    public void reconnect(int pool) throws SQLException
+    {
+        super.reconnect(pool);
+    }
+    
+    public void createTable (Statement stmt, String tableName) throws SQLException
+    {
+        super.createTable(stmt, tableName);
+    }
+
+    public int getMaxStateSize()
+    {
+        return super.getMaxStateSize();
+    }
+    
+    private int _state;
+}
+

Added: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockIBMDriver.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockIBMDriver.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockIBMDriver.java	2010-05-31 19:21:35 UTC (rev 33266)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2004,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: SyncRecord.java 2342 2006-03-30 13:06:17Z  $
+ */
+
+package com.hp.mwtests.ts.arjuna.resources.mock;
+
+import java.sql.SQLException;
+import java.sql.Statement;
+
+import com.arjuna.ats.internal.arjuna.objectstore.jdbc.ibm_driver;
+
+public class MockIBMDriver extends ibm_driver
+{
+    public void createTable (Statement stmt, String tableName) throws SQLException
+    {
+        super.createTable(stmt, tableName);
+    }
+
+    public int getMaxStateSize()
+    {
+        return super.getMaxStateSize();
+    }
+}
+

Added: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockJConnectDriver.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockJConnectDriver.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockJConnectDriver.java	2010-05-31 19:21:35 UTC (rev 33266)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2004,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: SyncRecord.java 2342 2006-03-30 13:06:17Z  $
+ */
+
+package com.hp.mwtests.ts.arjuna.resources.mock;
+
+import java.sql.SQLException;
+import java.sql.Statement;
+
+import com.arjuna.ats.internal.arjuna.objectstore.jdbc.jconnect_driver;
+
+public class MockJConnectDriver extends jconnect_driver
+{
+    public void createTable (Statement stmt, String tableName) throws SQLException
+    {
+        super.createTable(stmt, tableName);
+    }
+
+    public int getMaxStateSize()
+    {
+        return super.getMaxStateSize();
+    }
+}
+

Added: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockMSFTDriver.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockMSFTDriver.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockMSFTDriver.java	2010-05-31 19:21:35 UTC (rev 33266)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2004,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: SyncRecord.java 2342 2006-03-30 13:06:17Z  $
+ */
+
+package com.hp.mwtests.ts.arjuna.resources.mock;
+
+import java.sql.SQLException;
+import java.sql.Statement;
+
+import com.arjuna.ats.internal.arjuna.objectstore.jdbc.microsoft_driver;
+
+public class MockMSFTDriver extends microsoft_driver
+{
+    public void createTable (Statement stmt, String tableName) throws SQLException
+    {
+        super.createTable(stmt, tableName);
+    }
+
+    public int getMaxStateSize()
+    {
+        return super.getMaxStateSize();
+    }
+}
+

Added: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockMySqlDriver.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockMySqlDriver.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockMySqlDriver.java	2010-05-31 19:21:35 UTC (rev 33266)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2004,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: SyncRecord.java 2342 2006-03-30 13:06:17Z  $
+ */
+
+package com.hp.mwtests.ts.arjuna.resources.mock;
+
+import java.sql.SQLException;
+import java.sql.Statement;
+
+import com.arjuna.ats.internal.arjuna.objectstore.jdbc.mysql_ab_driver;
+
+public class MockMySqlDriver extends mysql_ab_driver
+{
+    public void createTable (Statement stmt, String tableName) throws SQLException
+    {
+        super.createTable(stmt, tableName);
+    }
+
+    public int getMaxStateSize()
+    {
+        return super.getMaxStateSize();
+    }
+}
+

Added: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockOracleDriver.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockOracleDriver.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockOracleDriver.java	2010-05-31 19:21:35 UTC (rev 33266)
@@ -0,0 +1,89 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2004,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: SyncRecord.java 2342 2006-03-30 13:06:17Z  $
+ */
+
+package com.hp.mwtests.ts.arjuna.resources.mock;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+import java.sql.Statement;
+
+import com.arjuna.ats.internal.arjuna.objectstore.JDBCImple;
+import com.arjuna.ats.internal.arjuna.objectstore.jdbc.oracle_driver;
+
+
+public class MockOracleDriver extends oracle_driver
+{
+    public MockOracleDriver ()
+    {
+        super._inUse = new boolean[1];
+        super._theConnection = new Connection[1];
+        super._preparedStatements = new PreparedStatement[1][];
+        
+        super._preparedStatements[0] = new PreparedStatement[JDBCImple.STATEMENT_SIZE];
+        
+        super._preparedStatements[0][JDBCImple.READ_STATE] = new MockPreparedStatement(false);
+        super._preparedStatements[0][JDBCImple.READ_WRITE_SHORTCUT] = new MockPreparedStatement();
+        super._preparedStatements[0][JDBCImple.WRITE_STATE_NEW] = new MockPreparedStatement();
+        super._preparedStatements[0][JDBCImple.SELECT_FOR_WRITE_STATE] = new MockPreparedStatement();
+        
+        super._inUse[0] = false;
+        super._theConnection[0] = new MockConnection();
+        
+        super._isValid = true;
+    }
+    
+    public void setValid (boolean valid)
+    {
+        super._isValid = valid;
+    }
+    
+    public void resetReadState ()
+    {
+        super._preparedStatements[0][JDBCImple.READ_STATE] = new MockPreparedStatement(true);
+    }
+    
+    public void resetReadWriteShortcut ()
+    {
+        super._preparedStatements[0][JDBCImple.READ_WRITE_SHORTCUT] = new MockPreparedStatement(false);
+    }
+    
+    public void createTable (Statement stmt, String tableName) throws SQLException
+    {
+        super.createTable(stmt, tableName);
+    }
+
+    public int getMaxStateSize()
+    {
+        return super.getMaxStateSize();
+    }
+}
+

Added: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockPostgresDriver.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockPostgresDriver.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockPostgresDriver.java	2010-05-31 19:21:35 UTC (rev 33266)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2004,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: SyncRecord.java 2342 2006-03-30 13:06:17Z  $
+ */
+
+package com.hp.mwtests.ts.arjuna.resources.mock;
+
+import java.sql.SQLException;
+import java.sql.Statement;
+
+import com.arjuna.ats.internal.arjuna.objectstore.jdbc.postgresql_driver;
+
+
+public class MockPostgresDriver extends postgresql_driver
+{
+    public void createTable (Statement stmt, String tableName) throws SQLException
+    {
+        super.createTable(stmt, tableName);
+    }
+
+    public int getMaxStateSize()
+    {
+        return super.getMaxStateSize();
+    }
+}
+

Added: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockPreparedStatement.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockPreparedStatement.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockPreparedStatement.java	2010-05-31 19:21:35 UTC (rev 33266)
@@ -0,0 +1,782 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2004,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: SyncRecord.java 2342 2006-03-30 13:06:17Z  $
+ */
+
+package com.hp.mwtests.ts.arjuna.resources.mock;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.math.BigDecimal;
+import java.net.URL;
+import java.sql.Array;
+import java.sql.Blob;
+import java.sql.Clob;
+import java.sql.Connection;
+import java.sql.Date;
+import java.sql.NClob;
+import java.sql.ParameterMetaData;
+import java.sql.PreparedStatement;
+import java.sql.Ref;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.RowId;
+import java.sql.SQLException;
+import java.sql.SQLWarning;
+import java.sql.SQLXML;
+import java.sql.Time;
+import java.sql.Timestamp;
+import java.util.Calendar;
+
+
+public class MockPreparedStatement implements PreparedStatement
+{
+    public MockPreparedStatement ()
+    {
+        this(true);
+    }
+    
+    public MockPreparedStatement (boolean n)
+    {
+        _next = n;
+    }
+    
+    @Override
+    public void addBatch () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void clearParameters () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public boolean execute () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public ResultSet executeQuery () throws SQLException
+    {
+        return new MockResultSet(_next);
+    }
+
+    @Override
+    public int executeUpdate () throws SQLException
+    {
+        return 1;
+    }
+
+    @Override
+    public ResultSetMetaData getMetaData () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public ParameterMetaData getParameterMetaData () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public void setArray (int parameterIndex, Array x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setAsciiStream (int parameterIndex, InputStream x)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setAsciiStream (int parameterIndex, InputStream x, int length)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setAsciiStream (int parameterIndex, InputStream x, long length)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setBigDecimal (int parameterIndex, BigDecimal x)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setBinaryStream (int parameterIndex, InputStream x)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setBinaryStream (int parameterIndex, InputStream x, int length)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setBinaryStream (int parameterIndex, InputStream x, long length)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setBlob (int parameterIndex, Blob x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setBlob (int parameterIndex, InputStream inputStream)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setBlob (int parameterIndex, InputStream inputStream,
+            long length) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setBoolean (int parameterIndex, boolean x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setByte (int parameterIndex, byte x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setBytes (int parameterIndex, byte[] x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setCharacterStream (int parameterIndex, Reader reader)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setCharacterStream (int parameterIndex, Reader reader,
+            int length) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setCharacterStream (int parameterIndex, Reader reader,
+            long length) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setClob (int parameterIndex, Clob x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setClob (int parameterIndex, Reader reader) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setClob (int parameterIndex, Reader reader, long length)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setDate (int parameterIndex, Date x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setDate (int parameterIndex, Date x, Calendar cal)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setDouble (int parameterIndex, double x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setFloat (int parameterIndex, float x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setInt (int parameterIndex, int x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setLong (int parameterIndex, long x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setNCharacterStream (int parameterIndex, Reader value)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setNCharacterStream (int parameterIndex, Reader value,
+            long length) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setNClob (int parameterIndex, NClob value) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setNClob (int parameterIndex, Reader reader)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setNClob (int parameterIndex, Reader reader, long length)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setNString (int parameterIndex, String value)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setNull (int parameterIndex, int sqlType) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setNull (int parameterIndex, int sqlType, String typeName)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setObject (int parameterIndex, Object x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setObject (int parameterIndex, Object x, int targetSqlType)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setObject (int parameterIndex, Object x, int targetSqlType,
+            int scaleOrLength) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setRef (int parameterIndex, Ref x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setRowId (int parameterIndex, RowId x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setSQLXML (int parameterIndex, SQLXML xmlObject)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setShort (int parameterIndex, short x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setString (int parameterIndex, String x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setTime (int parameterIndex, Time x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setTime (int parameterIndex, Time x, Calendar cal)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setTimestamp (int parameterIndex, Timestamp x)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setTimestamp (int parameterIndex, Timestamp x, Calendar cal)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setURL (int parameterIndex, URL x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setUnicodeStream (int parameterIndex, InputStream x, int length)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void addBatch (String sql) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void cancel () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void clearBatch () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void clearWarnings () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void close () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public boolean execute (String sql) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean execute (String sql, int autoGeneratedKeys)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean execute (String sql, int[] columnIndexes)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean execute (String sql, String[] columnNames)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public int[] executeBatch () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public ResultSet executeQuery (String sql) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public int executeUpdate (String sql) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public int executeUpdate (String sql, int autoGeneratedKeys)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public int executeUpdate (String sql, int[] columnIndexes)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public int executeUpdate (String sql, String[] columnNames)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public Connection getConnection () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public int getFetchDirection () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public int getFetchSize () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public ResultSet getGeneratedKeys () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public int getMaxFieldSize () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public int getMaxRows () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public boolean getMoreResults () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean getMoreResults (int current) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public int getQueryTimeout () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public ResultSet getResultSet () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public int getResultSetConcurrency () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public int getResultSetHoldability () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public int getResultSetType () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public int getUpdateCount () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public SQLWarning getWarnings () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public boolean isClosed () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean isPoolable () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public void setCursorName (String name) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setEscapeProcessing (boolean enable) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setFetchDirection (int direction) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setFetchSize (int rows) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setMaxFieldSize (int max) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setMaxRows (int max) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setPoolable (boolean poolable) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setQueryTimeout (int seconds) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public boolean isWrapperFor (Class<?> iface) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public <T> T unwrap (Class<T> iface) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+    
+    private boolean _next;
+}
+

Added: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockResultSet.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockResultSet.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockResultSet.java	2010-05-31 19:21:35 UTC (rev 33266)
@@ -0,0 +1,1438 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2004,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: SyncRecord.java 2342 2006-03-30 13:06:17Z  $
+ */
+
+package com.hp.mwtests.ts.arjuna.resources.mock;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.math.BigDecimal;
+import java.net.URL;
+import java.sql.Array;
+import java.sql.Blob;
+import java.sql.Clob;
+import java.sql.Date;
+import java.sql.NClob;
+import java.sql.Ref;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.RowId;
+import java.sql.SQLException;
+import java.sql.SQLWarning;
+import java.sql.SQLXML;
+import java.sql.Statement;
+import java.sql.Time;
+import java.sql.Timestamp;
+import java.util.Calendar;
+import java.util.Map;
+
+
+public class MockResultSet implements ResultSet
+{
+    public MockResultSet (boolean nxt)
+    {
+        _next = nxt;
+    }
+    
+    @Override
+    public boolean absolute (int row) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public void afterLast () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void beforeFirst () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void cancelRowUpdates () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void clearWarnings () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void close () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void deleteRow () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public int findColumn (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public boolean first () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public Array getArray (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Array getArray (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public InputStream getAsciiStream (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public InputStream getAsciiStream (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public BigDecimal getBigDecimal (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public BigDecimal getBigDecimal (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public BigDecimal getBigDecimal (int columnIndex, int scale)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public BigDecimal getBigDecimal (String columnLabel, int scale)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public InputStream getBinaryStream (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public InputStream getBinaryStream (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Blob getBlob (int columnIndex) throws SQLException
+    {
+        return new MockBlob();
+    }
+
+    @Override
+    public Blob getBlob (String columnLabel) throws SQLException
+    {
+        return new MockBlob();
+    }
+
+    @Override
+    public boolean getBoolean (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean getBoolean (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public byte getByte (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public byte getByte (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public byte[] getBytes (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public byte[] getBytes (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Reader getCharacterStream (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Reader getCharacterStream (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Clob getClob (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Clob getClob (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public int getConcurrency () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public String getCursorName () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Date getDate (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Date getDate (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Date getDate (int columnIndex, Calendar cal) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Date getDate (String columnLabel, Calendar cal) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public double getDouble (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public double getDouble (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public int getFetchDirection () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public int getFetchSize () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public float getFloat (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public float getFloat (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public int getHoldability () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public int getInt (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public int getInt (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public long getLong (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public long getLong (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public ResultSetMetaData getMetaData () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Reader getNCharacterStream (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Reader getNCharacterStream (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public NClob getNClob (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public NClob getNClob (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getNString (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getNString (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Object getObject (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Object getObject (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Object getObject (int columnIndex, Map<String, Class<?>> map)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Object getObject (String columnLabel, Map<String, Class<?>> map)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Ref getRef (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Ref getRef (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public int getRow () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public RowId getRowId (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public RowId getRowId (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public SQLXML getSQLXML (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public SQLXML getSQLXML (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public short getShort (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public short getShort (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public Statement getStatement () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getString (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getString (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Time getTime (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Time getTime (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Time getTime (int columnIndex, Calendar cal) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Time getTime (String columnLabel, Calendar cal) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Timestamp getTimestamp (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Timestamp getTimestamp (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Timestamp getTimestamp (int columnIndex, Calendar cal)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Timestamp getTimestamp (String columnLabel, Calendar cal)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public int getType () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public URL getURL (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public URL getURL (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public InputStream getUnicodeStream (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public InputStream getUnicodeStream (String columnLabel)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public SQLWarning getWarnings () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public void insertRow () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public boolean isAfterLast () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean isBeforeFirst () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean isClosed () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean isFirst () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean isLast () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean last () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public void moveToCurrentRow () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void moveToInsertRow () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public boolean next () throws SQLException
+    {
+        return _next;
+    }
+
+    @Override
+    public boolean previous () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public void refreshRow () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public boolean relative (int rows) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean rowDeleted () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean rowInserted () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean rowUpdated () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public void setFetchDirection (int direction) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setFetchSize (int rows) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateArray (int columnIndex, Array x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateArray (String columnLabel, Array x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateAsciiStream (int columnIndex, InputStream x)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateAsciiStream (String columnLabel, InputStream x)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateAsciiStream (int columnIndex, InputStream x, int length)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateAsciiStream (String columnLabel, InputStream x, int length)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateAsciiStream (int columnIndex, InputStream x, long length)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateAsciiStream (String columnLabel, InputStream x,
+            long length) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateBigDecimal (int columnIndex, BigDecimal x)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateBigDecimal (String columnLabel, BigDecimal x)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateBinaryStream (int columnIndex, InputStream x)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateBinaryStream (String columnLabel, InputStream x)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateBinaryStream (int columnIndex, InputStream x, int length)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateBinaryStream (String columnLabel, InputStream x,
+            int length) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateBinaryStream (int columnIndex, InputStream x, long length)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateBinaryStream (String columnLabel, InputStream x,
+            long length) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateBlob (int columnIndex, Blob x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateBlob (String columnLabel, Blob x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateBlob (int columnIndex, InputStream inputStream)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateBlob (String columnLabel, InputStream inputStream)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateBlob (int columnIndex, InputStream inputStream,
+            long length) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateBlob (String columnLabel, InputStream inputStream,
+            long length) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateBoolean (int columnIndex, boolean x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateBoolean (String columnLabel, boolean x)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateByte (int columnIndex, byte x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateByte (String columnLabel, byte x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateBytes (int columnIndex, byte[] x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateBytes (String columnLabel, byte[] x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateCharacterStream (int columnIndex, Reader x)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateCharacterStream (String columnLabel, Reader reader)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateCharacterStream (int columnIndex, Reader x, int length)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateCharacterStream (String columnLabel, Reader reader,
+            int length) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateCharacterStream (int columnIndex, Reader x, long length)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateCharacterStream (String columnLabel, Reader reader,
+            long length) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateClob (int columnIndex, Clob x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateClob (String columnLabel, Clob x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateClob (int columnIndex, Reader reader) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateClob (String columnLabel, Reader reader)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateClob (int columnIndex, Reader reader, long length)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateClob (String columnLabel, Reader reader, long length)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateDate (int columnIndex, Date x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateDate (String columnLabel, Date x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateDouble (int columnIndex, double x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateDouble (String columnLabel, double x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateFloat (int columnIndex, float x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateFloat (String columnLabel, float x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateInt (int columnIndex, int x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateInt (String columnLabel, int x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateLong (int columnIndex, long x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateLong (String columnLabel, long x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateNCharacterStream (int columnIndex, Reader x)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateNCharacterStream (String columnLabel, Reader reader)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateNCharacterStream (int columnIndex, Reader x, long length)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateNCharacterStream (String columnLabel, Reader reader,
+            long length) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateNClob (int columnIndex, NClob clob) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateNClob (String columnLabel, NClob clob)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateNClob (int columnIndex, Reader reader)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateNClob (String columnLabel, Reader reader)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateNClob (int columnIndex, Reader reader, long length)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateNClob (String columnLabel, Reader reader, long length)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateNString (int columnIndex, String string)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateNString (String columnLabel, String string)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateNull (int columnIndex) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateNull (String columnLabel) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateObject (int columnIndex, Object x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateObject (String columnLabel, Object x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateObject (int columnIndex, Object x, int scaleOrLength)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateObject (String columnLabel, Object x, int scaleOrLength)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateRef (int columnIndex, Ref x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateRef (String columnLabel, Ref x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateRow () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateRowId (int columnIndex, RowId x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateRowId (String columnLabel, RowId x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateSQLXML (int columnIndex, SQLXML xmlObject)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateSQLXML (String columnLabel, SQLXML xmlObject)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateShort (int columnIndex, short x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateShort (String columnLabel, short x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateString (int columnIndex, String x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateString (String columnLabel, String x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateTime (int columnIndex, Time x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateTime (String columnLabel, Time x) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateTimestamp (int columnIndex, Timestamp x)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void updateTimestamp (String columnLabel, Timestamp x)
+            throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public boolean wasNull () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean isWrapperFor (Class<?> iface) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public <T> T unwrap (Class<T> iface) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+    
+    private boolean _next;
+}
+

Added: labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockStatement.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockStatement.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/resources/mock/MockStatement.java	2010-05-31 19:21:35 UTC (rev 33266)
@@ -0,0 +1,337 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (C) 2004,
+ *
+ * Arjuna Technologies Limited,
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: SyncRecord.java 2342 2006-03-30 13:06:17Z  $
+ */
+
+package com.hp.mwtests.ts.arjuna.resources.mock;
+
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.SQLWarning;
+import java.sql.Statement;
+
+public class MockStatement implements Statement
+{
+
+    @Override
+    public void addBatch (String arg0) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void cancel () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void clearBatch () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void clearWarnings () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void close () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public boolean execute (String arg0) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean execute (String arg0, int arg1) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean execute (String arg0, int[] arg1) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean execute (String arg0, String[] arg1) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public int[] executeBatch () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public ResultSet executeQuery (String arg0) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public int executeUpdate (String arg0) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public int executeUpdate (String arg0, int arg1) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public int executeUpdate (String arg0, int[] arg1) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public int executeUpdate (String arg0, String[] arg1) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public Connection getConnection () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public int getFetchDirection () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public int getFetchSize () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public ResultSet getGeneratedKeys () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public int getMaxFieldSize () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public int getMaxRows () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public boolean getMoreResults () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean getMoreResults (int arg0) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public int getQueryTimeout () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public ResultSet getResultSet () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public int getResultSetConcurrency () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public int getResultSetHoldability () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public int getResultSetType () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public int getUpdateCount () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public SQLWarning getWarnings () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public boolean isClosed () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean isPoolable () throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public void setCursorName (String arg0) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setEscapeProcessing (boolean arg0) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setFetchDirection (int arg0) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setFetchSize (int arg0) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setMaxFieldSize (int arg0) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setMaxRows (int arg0) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setPoolable (boolean arg0) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public void setQueryTimeout (int arg0) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public boolean isWrapperFor (Class<?> arg0) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public <T> T unwrap (Class<T> arg0) throws SQLException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+}
+



More information about the jboss-svn-commits mailing list