DERBY-6879: Engine deadlock between XA timeout handling and cleanupOnError

This patch was contributed by Brett Bergquist (brett at thebergquistfamily dot com)

This change is a follow-up to revision 1751977.

The problem with that revision occurs if a timeout occurs calling "cancel"
and if an error occurs on the clients connection causing the "cleanupOnError"
to be called at the same time.

This change creates a new private static class that is used to track if
"cancel" or "cleanupOnError" has been invoked. The methods are synchronized
so that there is no timing issue on checking and recording the state.


git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1753333 13f79535-47bb-0310-9956-ffa450edef68
1 file changed