=== modified file 'README'
--- a/README	2008-02-16 17:04:54 +0000
+++ b/README	2008-02-21 17:47:11 +0000
@@ -1,4 +1,5 @@
 NDB/Bindings project. 
+test change.
 
 Things are built with a normal ./configure; make.
 

=== modified file 'java/com/mysql/cluster/ndbj/NdbJtaTransaction.java'
--- a/java/com/mysql/cluster/ndbj/NdbJtaTransaction.java	2007-12-26 22:53:00 +0000
+++ b/java/com/mysql/cluster/ndbj/NdbJtaTransaction.java	2008-02-12 18:40:53 +0000
@@ -14,11 +14,6 @@
 	private boolean rollbackOnly = false;
 	private boolean inCommit = false;
 	
-	public abstract int execute(ExecType execType, AbortOption abortOption, boolean force) throws NdbApiException;
-	public abstract int execute(ExecType execType, AbortOption abortOption) throws NdbApiException;
-	public abstract int execute(ExecType execType) throws NdbApiException;
-
-
 	public void commit() throws RollbackException, HeuristicMixedException,
 			HeuristicRollbackException, SecurityException,
 			IllegalStateException, SystemException {
@@ -30,7 +25,7 @@
 			if (rollbackOnly) { 
 				throw new RollbackException("Rollback requested");
 			}
-			retVal = execute(ExecType.Commit,AbortOption.AbortOnError,false);
+			retVal = realExecute(ExecType.Commit,AbortOption.AbortOnError,false);
 		} catch (NdbApiException e) { 
 			rollback();
 			throw new RollbackException("Transaction failed and was rolled back: "+e.message);
@@ -79,7 +74,7 @@
 			synchronization.beforeCompletion();
 		}
 		try { 
-			retVal = execute(ExecType.Rollback,AbortOption.AbortOnError,false);
+			retVal = realExecute(ExecType.Rollback,AbortOption.AbortOnError,false);
 		} catch (NdbApiException e) { 
 			throw new SystemException("Couldn't rollback - something is seriously wrong: " + e.message);
 		} finally { 

=== modified file 'java/com/mysql/cluster/ndbj/NdbOperationFactory.java'
--- a/java/com/mysql/cluster/ndbj/NdbOperationFactory.java	2008-02-16 17:04:54 +0000
+++ b/java/com/mysql/cluster/ndbj/NdbOperationFactory.java	2008-02-16 21:04:57 +0000
@@ -1,9 +1,19 @@
 package com.mysql.cluster.ndbj;
 
+import java.sql.ResultSet;
+
 import com.mysql.cluster.ndbj.NdbScanOperation.ScanFlag;
 
 public interface NdbOperationFactory {
 
+	/**
+	 * Execute the transaction. 
+	 * @return a ResultSet 
+	 */
+	public ResultSet execute() throws NdbApiException,
+	NdbApiTemporaryException, NdbApiPermanentException,
+	InvalidSchemaObjectVersionException;
+	
 	/** 
 	 * Set the LockMode for subsequently created Operations. Note - This does not set a global LockMode 
 	 * for the transaction - it merely sets the lock mode to use for the next Operations created by this 

=== modified file 'java/com/mysql/cluster/ndbj/NdbOperationFactoryImpl.java'
--- a/java/com/mysql/cluster/ndbj/NdbOperationFactoryImpl.java	2008-02-16 17:04:54 +0000
+++ b/java/com/mysql/cluster/ndbj/NdbOperationFactoryImpl.java	2008-02-16 21:04:57 +0000
@@ -1,7 +1,10 @@
 package com.mysql.cluster.ndbj;
 
+import java.sql.ResultSet;
+import java.util.Queue;
 import java.util.Map;
 import java.util.HashMap;
+import java.util.concurrent.ConcurrentLinkedQueue;
 
 import com.mysql.cluster.ndbj.NdbOperation.LockMode;
 import com.mysql.cluster.ndbj.NdbScanOperation.ScanFlag;
@@ -15,6 +18,21 @@
 	private long parallel = 0L;
 
 	private final Map<Long, NdbOperationImpl> createdOperations = new HashMap<Long, NdbOperationImpl>();
+	private final Queue<NdbOperationImpl> operationsList = new ConcurrentLinkedQueue<NdbOperationImpl>();
+
+	protected abstract int realExecute(ExecType execType,
+			AbortOption abortOption, boolean force) throws NdbApiException,
+			NdbApiTemporaryException, NdbApiPermanentException,
+			InvalidSchemaObjectVersionException;
+
+	protected abstract int realExecute(ExecType execType,
+			AbortOption abortOption) throws NdbApiException,
+			NdbApiTemporaryException, NdbApiPermanentException,
+			InvalidSchemaObjectVersionException;
+
+	protected abstract int realExecute(ExecType execType)
+			throws NdbApiException, NdbApiTemporaryException,
+			NdbApiPermanentException, InvalidSchemaObjectVersionException;
 
 	protected abstract NdbOperation getNdbOperation(String tableName)
 			throws NdbApiException;
@@ -46,6 +64,54 @@
 	protected abstract NdbIndexOperation getNdbIndexOperation(NdbIndex anIndex)
 			throws NdbApiException;
 
+	public ResultSet execute() throws NdbApiException,
+	NdbApiTemporaryException, NdbApiPermanentException,
+	InvalidSchemaObjectVersionException {
+		realExecute(ExecType.NoCommit);
+		NdbResultSetImpl resultSetImpl = null;
+		if (!operationsList.isEmpty()) { 
+			resultSetImpl = new NdbResultSetImpl(operationsList);
+			operationsList.clear();
+		}
+		return resultSetImpl;
+	}
+	
+	public ResultSet execute(ExecType theExecType) throws NdbApiException,
+	NdbApiTemporaryException, NdbApiPermanentException,
+	InvalidSchemaObjectVersionException {
+		realExecute(theExecType);
+		NdbResultSetImpl resultSetImpl = null;
+		if (!operationsList.isEmpty()) { 
+			resultSetImpl = new NdbResultSetImpl(operationsList);
+			operationsList.clear();
+		}
+		return resultSetImpl;
+	}
+	
+	public ResultSet execute(ExecType theExecType, AbortOption theAbortOption) throws NdbApiException,
+	NdbApiTemporaryException, NdbApiPermanentException,
+	InvalidSchemaObjectVersionException {
+		realExecute(theExecType, theAbortOption);
+		NdbResultSetImpl resultSetImpl = null;
+		if (!operationsList.isEmpty()) { 
+			resultSetImpl = new NdbResultSetImpl(operationsList);
+			operationsList.clear();
+		}
+		return resultSetImpl;
+	}
+	
+	
+	public ResultSet execute(ExecType theExecType, AbortOption theAbortOption, boolean force) throws NdbApiException,
+	NdbApiTemporaryException, NdbApiPermanentException,
+	InvalidSchemaObjectVersionException {
+		realExecute(theExecType, theAbortOption, force);
+		NdbResultSetImpl resultSetImpl = null;
+		if (!operationsList.isEmpty()) { 
+			resultSetImpl = new NdbResultSetImpl(operationsList);
+			operationsList.clear();
+		}
+		return resultSetImpl;
+	}
 	/*
 	 * (non-Javadoc)
 	 * 
@@ -84,6 +150,7 @@
 		theOperation.readTuple(theLockMode);
 		createdOperations.put(new Long(NdbOperationImpl.getCPtr(theOperation)),
 				theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -98,6 +165,7 @@
 		theOperation.readTuple(lockMode);
 		createdOperations.put(new Long(NdbOperationImpl.getCPtr(theOperation)),
 				theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -112,6 +180,7 @@
 		theOperation.readTuple(theLockMode);
 		createdOperations.put(new Long(NdbOperationImpl.getCPtr(theOperation)),
 				theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -126,6 +195,7 @@
 		theOperation.readTuple(lockMode);
 		createdOperations.put(new Long(NdbOperationImpl.getCPtr(theOperation)),
 				theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -146,6 +216,7 @@
 		theOperation.updateTuple();
 		createdOperations.put(new Long(NdbOperationImpl.getCPtr(theOperation)),
 				theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -166,6 +237,7 @@
 		theOperation.updateTuple();
 		createdOperations.put(new Long(NdbOperationImpl.getCPtr(theOperation)),
 				theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -186,6 +258,7 @@
 		theOperation.insertTuple();
 		createdOperations.put(new Long(NdbOperationImpl.getCPtr(theOperation)),
 				theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -206,6 +279,7 @@
 		theOperation.insertTuple();
 		createdOperations.put(new Long(NdbOperationImpl.getCPtr(theOperation)),
 				theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -226,6 +300,7 @@
 		theOperation.deleteTuple();
 		createdOperations.put(new Long(NdbOperationImpl.getCPtr(theOperation)),
 				theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -246,6 +321,7 @@
 		theOperation.deleteTuple();
 		createdOperations.put(new Long(NdbOperationImpl.getCPtr(theOperation)),
 				theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -259,6 +335,7 @@
 		theOperation.deleteTuple();
 		createdOperations.put(new Long(NdbIndexOperationImpl.getCPtr(theOperation)),
 				theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -271,6 +348,7 @@
 		theOperation.deleteTuple();
 		createdOperations.put(new Long(NdbIndexOperationImpl.getCPtr(theOperation)),
 				theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -283,6 +361,7 @@
 		theOperation.deleteTuple();
 		createdOperations.put(new Long(NdbIndexOperationImpl.getCPtr(theOperation)),
 				theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 	/* (non-Javadoc)
@@ -294,6 +373,7 @@
 		theOperation.readTuple(theLockMode);
 		createdOperations.put(new Long(NdbIndexOperationImpl.getCPtr(theOperation)),
 				theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -306,6 +386,7 @@
 		theOperation.readTuple(lockMode);
 		createdOperations.put(new Long(NdbIndexOperationImpl.getCPtr(theOperation)),
 				theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -319,6 +400,7 @@
 		theOperation.readTuple(theLockMode);
 		createdOperations.put(new Long(NdbIndexOperationImpl.getCPtr(theOperation)),
 				theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -331,6 +413,7 @@
 		theOperation.readTuple(lockMode);
 		createdOperations.put(new Long(NdbIndexOperationImpl.getCPtr(theOperation)),
 				theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -343,6 +426,7 @@
 		theOperation.updateTuple();
 		createdOperations.put(new Long(NdbIndexOperationImpl.getCPtr(theOperation)),
 				theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -355,6 +439,7 @@
 		theOperation.updateTuple();
 		createdOperations.put(new Long(NdbIndexOperationImpl.getCPtr(theOperation)),
 				theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -375,6 +460,7 @@
 		theOperation.readTuples(lockMode);
 		createdOperations.put(new Long(NdbScanOperationImpl
 				.getCPtr(theOperation)), theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -395,6 +481,7 @@
 		theOperation.readTuples(lockMode);
 		createdOperations.put(new Long(NdbScanOperationImpl
 				.getCPtr(theOperation)), theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -417,6 +504,7 @@
 		theOperation.readTuples(lockMode, scanFlag, parallel, batch);
 		createdOperations.put(new Long(NdbScanOperationImpl
 				.getCPtr(theOperation)), theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -439,6 +527,7 @@
 		theOperation.readTuples(lockMode, scanFlag, parallel, batch);
 		createdOperations.put(new Long(NdbScanOperationImpl
 				.getCPtr(theOperation)), theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -461,6 +550,7 @@
 		theOperation.readTuples(lockMode, scanFlag, parallel, batch);
 		createdOperations.put(new Long(NdbScanOperationImpl
 				.getCPtr(theOperation)), theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -483,6 +573,7 @@
 		theOperation.readTuples(lockMode, scanFlag, parallel, batch);
 		createdOperations.put(new Long(NdbScanOperationImpl
 				.getCPtr(theOperation)), theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -506,6 +597,7 @@
 		theOperation.readTuples(lockMode);
 		createdOperations.put(new Long(NdbIndexScanOperationImpl
 				.getCPtr(theOperation)), theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -529,6 +621,7 @@
 		theOperation.readTuples(lockMode);
 		createdOperations.put(new Long(NdbIndexScanOperationImpl
 				.getCPtr(theOperation)), theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -549,6 +642,7 @@
 		theOperation.readTuples(lockMode);
 		createdOperations.put(new Long(NdbIndexScanOperationImpl
 				.getCPtr(theOperation)), theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -574,6 +668,7 @@
 		theOperation.readTuples(lockMode, scanFlag, parallel, batch);
 		createdOperations.put(new Long(NdbScanOperationImpl
 				.getCPtr(theOperation)), theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -599,6 +694,7 @@
 		theOperation.readTuples(lockMode, scanFlag, parallel, batch);
 		createdOperations.put(new Long(NdbIndexScanOperationImpl
 				.getCPtr(theOperation)), theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -621,6 +717,7 @@
 		theOperation.readTuples(lockMode, scanFlag, parallel, batch);
 		createdOperations.put(new Long(NdbScanOperationImpl
 				.getCPtr(theOperation)), theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -646,6 +743,7 @@
 		theOperation.readTuples(lockMode, scanFlag, parallel, batch);
 		createdOperations.put(new Long(NdbScanOperationImpl
 				.getCPtr(theOperation)), theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -671,6 +769,7 @@
 		theOperation.readTuples(lockMode, scanFlag, parallel, batch);
 		createdOperations.put(new Long(NdbIndexScanOperationImpl
 				.getCPtr(theOperation)), theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 
@@ -693,6 +792,7 @@
 		theOperation.readTuples(lockMode, scanFlag, parallel, batch);
 		createdOperations.put(new Long(NdbScanOperationImpl
 				.getCPtr(theOperation)), theOperation);
+		operationsList.add(theOperation);
 		return theOperation;
 	}
 

=== modified file 'java/com/mysql/cluster/ndbj/NdbResultSetImpl.java'
--- a/java/com/mysql/cluster/ndbj/NdbResultSetImpl.java	2008-01-05 06:02:55 +0000
+++ b/java/com/mysql/cluster/ndbj/NdbResultSetImpl.java	2008-02-16 21:03:34 +0000
@@ -3,6 +3,8 @@
 import java.util.Map;
 import java.util.HashMap;
 import java.util.ArrayList;
+import java.util.Queue;
+import java.util.Stack;
 import java.sql.SQLException;
 import java.sql.Timestamp;
 
@@ -36,7 +38,7 @@
     	NdbResultSetMetaData theMetaData = null;
 
 
-
+    	private Queue<NdbOperationImpl> remainingOps;
 
   /**
    * Creates a new <code>NdbResultSetImpl</code> instance.
@@ -60,6 +62,10 @@
 		
 	}
 
+	NdbResultSetImpl(Queue<NdbOperationImpl> createdOperations) { 
+		this.op=createdOperations.poll();
+		this.remainingOps = createdOperations;
+	}
 
 	/**
      * @see com.mysql.cluster.ndbj.NdbResultSet#getInt(int)

=== modified file 'java/com/mysql/cluster/ndbj/NdbTransaction.java'
--- a/java/com/mysql/cluster/ndbj/NdbTransaction.java	2008-02-13 00:31:51 +0000
+++ b/java/com/mysql/cluster/ndbj/NdbTransaction.java	2008-02-13 01:12:42 +0000
@@ -1,6 +1,8 @@
 package com.mysql.cluster.ndbj;
 
 import java.math.BigInteger;
+import java.sql.ResultSet;
+
 import javax.transaction.Transaction;
 
 /**
@@ -174,7 +176,7 @@
 	 *             serious (possibly user) error (such as deleting a row that
 	 *             doesn't exist).
 	 */
-	int execute(ExecType execType, AbortOption abortOption, boolean force)
+	ResultSet execute(ExecType execType, AbortOption abortOption, boolean force)
 			throws NdbApiException;
 
 	/**
@@ -237,7 +239,7 @@
 	 *             serious (possibly user) error (such as deleting a row that
 	 *             doesn't exist).
 	 */
-	int execute(ExecType execType, AbortOption abortOption)
+	ResultSet execute(ExecType execType, AbortOption abortOption)
 			throws NdbApiException;
 
 	/**
@@ -293,7 +295,7 @@
 	 *             serious (possibly user) error (such as deleting a row that
 	 *             doesn't exist).
 	 */
-	int execute(ExecType execType) throws NdbApiException;
+	ResultSet execute(ExecType execType) throws NdbApiException;
 
 	/**
 	 * This method should only be used after the transaction has been executed,

=== modified file 'java/swig/NdbTransaction.i'
--- a/java/swig/NdbTransaction.i	2008-02-16 17:04:54 +0000
+++ b/java/swig/NdbTransaction.i	2008-02-16 21:04:57 +0000
@@ -40,8 +40,9 @@
 %javamethodmodifiers NdbTransaction::getNdbIndexScanOperation "@Override
   protected";
 
+%rename(realExecute) NdbTransaction::execute;
 %javamethodmodifiers NdbTransaction::execute "@Override
-  public";
+  protected";
 
 %include "ndbapi/NdbTransaction.i"
 



