Index: java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/setTransactionIsolation.java
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/setTransactionIsolation.java	(revision 473360)
+++ java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/setTransactionIsolation.java	(working copy)
@@ -78,7 +78,7 @@
     Statement stmt = conn.createStatement();
 
 
-	String[] tabsToDrop = {"tab1", "t1", "t1copy", "t2"};
+	String[] tabsToDrop = {"tab1", "t1", "t1copy", "t2", "t3"};
 	for (int i = 0; i < tabsToDrop.length; i++)
 		dropTable(stmt,tabsToDrop[i]);
 
@@ -111,6 +111,10 @@
 	stmt.executeUpdate("INSERT INTO T1 VALUES(1,'First Hello')");
 	stmt.executeUpdate("INSERT INTO T1 VALUES(2,'Second Hello')");
 	stmt.executeUpdate("INSERT INTO T1 VALUES(3,'Third Hello')");
+
+
+    stmt.executeUpdate("create table t3 (i integer)");
+
     System.out.println("done creating table and inserting data.");
 
     stmt.close();
@@ -128,7 +132,7 @@
 		   conn.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
 		   testIsolation(conn, false);
 		   testSetTransactionIsolationInHoldCursor(conn);
-
+           testSetTransactionIsolationCommits(conn);
 		} catch (SQLException sqle) {
 			System.out.print("FAIL:");
 			org.apache.derby.tools.JDBCDisplayUtil.ShowSQLException(System.out, sqle);
@@ -213,6 +217,50 @@
 		System.out.println("FAIL: setTransactionIsolation() did not throw exception with open hold cursor");
 	}
 	
+	/**
+	 *   setTransactionIsolation commits?
+	 */
+	public static void testSetTransactionIsolationCommits(Connection conn) 
+	{
+        // In the current client implementation, the transaction will
+        // commit when setTransactionIsolation is called, while the
+        // embedded driver will not commit. See
+        // http://issues.apache.org/jira/browse/DERBY-2064
+		try {
+            conn.rollback();
+            conn.setAutoCommit(false);
+			conn.setTransactionIsolation(java.sql.Connection.TRANSACTION_SERIALIZABLE);
+            Statement s = conn.createStatement();
+            s.executeUpdate("delete from t3");
+            s.executeUpdate("insert into t3 values(1)");
+            conn.commit();
+            s.executeUpdate("insert into t3 values(2)");
+			conn.setTransactionIsolation(java.sql.Connection.TRANSACTION_SERIALIZABLE);
+            conn.rollback();
+            ResultSet rs = s.executeQuery("select count(*) from t3");
+            rs.next();
+            int count = rs.getInt(1);
+            switch (count) {
+            case 1:
+                System.out.println("count="+ count + 
+                                   ", setTransactionIsolation() does not commit");
+                break;
+            case 2:
+                System.out.println("count="+ count + 
+                                   ", setTransactionIsolation() commits");
+                break;
+            default:
+                System.out.println("FAIL: count="+ count + 
+                                   ", unexepected behaviour from testSetTransactionIsolationCommits");
+                break;
+            }
+            rs.close();
+            s.close();
+		} catch (SQLException se) {
+			System.out.println(se.getMessage());
+		}
+	}
+	
 	public static void testLevelsAndPrintStatistics(Connection con, String sql,
 													boolean makeNewStatements)
 		throws SQLException
Index: java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/setTransactionIsolation.out
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/setTransactionIsolation.out	(revision 473360)
+++ java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/setTransactionIsolation.out	(working copy)
@@ -493,3 +493,4 @@
 insert into t1copy (select * from t1)
 A lock could not be obtained within the time requested
 FAIL: setTransactionIsolation() did not throw exception with open hold cursor
+count=1, setTransactionIsolation() does not commit
Index: java/testing/org/apache/derbyTesting/functionTests/master/setTransactionIsolation.out
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/master/setTransactionIsolation.out	(revision 473360)
+++ java/testing/org/apache/derbyTesting/functionTests/master/setTransactionIsolation.out	(working copy)
@@ -529,3 +529,5 @@
 insert into t1copy (select * from t1)
 A lock could not be obtained within the time requested
 EXPECTED EXCEPTION SQLSTATE:X0X03 Invalid transaction state - held cursor requires same isolation level
+count=1, setTransactionIsolation() does not commit
+
Index: java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/setTransactionIsolation.out
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/setTransactionIsolation.out	(revision 473360)
+++ java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/setTransactionIsolation.out	(working copy)
@@ -529,3 +529,4 @@
 insert into t1copy (select * from t1)
 A lock could not be obtained within the time requested
 EXPECTED EXCEPTION SQLSTATE:X0X03 Invalid transaction state - held cursor requires same isolation level
+count=2, setTransactionIsolation() commits
Index: java/client/org/apache/derby/client/am/Connection.java
===================================================================
--- java/client/org/apache/derby/client/am/Connection.java	(revision 473360)
+++ java/client/org/apache/derby/client/am/Connection.java	(working copy)
@@ -945,8 +945,13 @@
                                 java.sql.ResultSet.CONCUR_READ_ONLY,
                                 holdability());
             }
+
             setTransactionIsolationStmt.executeUpdate("SET CURRENT ISOLATION = " + levelString);
 
+            // The server has now implicitely committed the
+            // transaction so we have to clean up locally.
+            completeLocalCommit();
+
             isolation_ = level;
         }
         catch ( SqlException se )
