Mantis - Resin
Viewing Issue Advanced Details
2454 major always 02-21-08 17:01 03-03-08 15:24
ddalessa  
ferg  
normal  
closed 3.1.4  
fixed  
none    
none 3.1.6  
0002454: error thrown in TransactionImpl.callBeforeCompletion results in leaking connections
An error thrown by a synchronization in callBeforeCompletion causes a RollBackException to be thrown without a rollback being issued to the resource.

So for example if we start a transaction and execute some statements that will cause an error on commit, eg a constraint violation on the underlying database, the afterCompletion on the Synchronization is never called and the resource is not rolled back.

I am using postgres 8.3 and this results in dangling connections left in "<IDLE> in transaction" which can lock resources or StaleStateExceptions. Not sure if this is an issue with other databases.

I believe this can be fixed by modifying TransactionContext.commit

Notes
(0002807)
ferg   
03-03-08 15:24   
server/16h{0,1}