Details
Description
Using this piece of code derby will not release a table lock of 'dummy' table.
String query = "insert into dummy (field1) values ('" + Integer.toString(value) + "')";
XAConnection xaConnection = createXAConnection("jdbc:derby://localhost:1527/TestDB", "", "");
XAResource xaResource = xaConnection.getXAResource();
conn = xaConnection.getConnection();
Xid xid = createXid(value);
xaResource.setTransactionTimeout(10);
xaResource.start(xid, XAResource.TMNOFLAGS);
Statement statement = conn.createStatement();
statement.execute(query);
// terminate the client application
// this will not release any locks
System.exit(0);