I have a patch to fix Derby-8 (Connection object gets created with un-supported holdability on getting Connection object from XAConnection "inside" the global transaction) and Derby-366 (In jdk13, when a connection transitions from global transaction to local transaction, its default holdability of HOLD_CURSORS_OVER_COMMIT is not restored.) The patch is attached to both Derby-8 and Derby-366.
The fix for both these bugs was centered around fixing the holdability handling in BrokeredConnection.java This was because BrokeredConnection.java had no code for restoring the holdability of real connection object and no code for saving the current holdability state of real connection object. I put fix for both these issues in BrokeredConnection.java so that both jdk13 and jdk14+ environments will be handled correctly. Had to use reflection for this holdability work
because Connection.setHoldability and Connection.getHoldability methods are not available through JDK13 apis.
Kathey, may be you can try this fix with Network Server and see if it resolves any related issues you had there?
I have run the test suite and this fix has not caused any failures. Have changed some of the existing XA tests so that they can rely on correct holdability status inside and outside global transaction.
If no comments from anyone, can a commiter please commit this patch?