Issue Details (XML | Word | Printable)

Key: DERBY-638
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Bernt M. Johnsen
Reporter: Deepa Remesh
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Derby

Network driver setTransactionIsolation() causes a commit, but does not complete it locally

Created: 22/Oct/05 03:33 AM   Updated: 13/Dec/07 09:04 AM
Return to search
Component/s: Network Client
Affects Version/s: 10.1.3.1, 10.2.1.6, 10.3.1.4
Fix Version/s: 10.1.3.2, 10.2.2.0, 10.3.1.4

Time Tracking:
Not Specified

File Attachments:
  Size
Java Source File Licensed for inclusion in ASF works d638.java 2005-10-22 03:49 AM Deepa Remesh 1.0 kB
Java Source File Licensed for inclusion in ASF works d638_repro2.java 2006-11-08 05:15 PM Deepa Remesh 1 kB
Java Source File Licensed for inclusion in ASF works d638_repro3.java 2006-11-08 10:21 PM Bernt M. Johnsen 2 kB
File Licensed for inclusion in ASF works DERBY-638-v2.diff 2006-11-08 03:23 PM Bernt M. Johnsen 0.8 kB
File Licensed for inclusion in ASF works DERBY-638-v3-for-10.1.diff 2006-11-16 12:09 PM Bernt M. Johnsen 6 kB
File Licensed for inclusion in ASF works DERBY-638-v3.diff 2006-11-10 03:15 PM Bernt M. Johnsen 6 kB
File Licensed for inclusion in ASF works DERBY-638-v3.stat 2006-11-10 03:15 PM Bernt M. Johnsen 0.5 kB
File Licensed for inclusion in ASF works DERBY-638.diff 2006-11-07 03:04 PM Bernt M. Johnsen 0.7 kB
Issue Links:
Incorporates
 
Reference

Resolution Date: 16/Nov/06 12:24 PM


 Description  « Hide
When autocommit is set to false, a call to setTransactionIsolation using client driver does not end the transaction when the method exits. When a close() is called on the conection, it throws an exception.

Running the code below:

       conn.setAutoCommit(false);
       conn.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
       try{
               conn.close();
       }catch(SQLException se){
               System.out.println("Got exception when closing the connection");
               se.printStackTrace();
       }

with client driver gives:
Got exception when closing the connection
org.apache.derby.client.am.SqlException: java.sql.Connection.close() requested while a transaction is in progress on the connection.The transaction remains active, and the connection cannot be closed.

with embedded driver, it works okay and does not throw any exception.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.