Description
If you have code like this in a Synchronization.afterCompletion:
Connection c = ds.getConnection();
//do something
c.close();
it gets added to the connection tracking of the transaction context that just ended. c.close() returns it to the pool, properly, but the end-of-tx cleanup returns it to the pool a second time.
The connection should not be tracked by the transaction context, the transaction is over.