Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
10.1.3.1
-
None
Description
I found this issue when working on DERBY-1044 which was filed for the isolation not getting reset for XAConnections.
I found that this was a generic issue for PooledConnections and also that holdability was also wrong.
The fix proposed for DERBY-1044 should also fix this issue. That bug has the repro for the isolation state issue
For holdability, this code passes for embedded but fails for client:
// Test holdability
ConnectionPoolDataSource ds = TestUtil.getConnectionPoolDataSource(p);
pc1 = ds.getPooledConnection();
testPooledConnHoldability("PooledConnection", pc1);
pc1.close();
**
- @param string
- @param pc1
*/
private static void testPooledConnHoldability(String string, PooledConnection pc1)
throws SQLExceptionUnknown macro: { System.out.println("n**Test holdability state**"); Connection conn = pc1.getConnection(); conn.setHoldability(ResultSet.CLOSE_CURSORS_AT_COMMIT); // reset the connection and see if the holdability gets reset conn = pc1.getConnection(); int holdability = conn.getHoldability(); if (holdability != ResultSet.HOLD_CURSORS_OVER_COMMIT) { System.out.println("FAIL: Holdability not reset on get Connection"); } else { System.out.println("PASS: Holdability reset on getConnection"); } conn.close(); }
Attachments
Attachments
Issue Links
- incorporates
-
DERBY-1044 [xa] client XAConnection.getConnection() does not have the correct default isolation level if set by an earlier connection obtained from the same XAConnection
- Closed