Skip to content

Instantly share code, notes, and snippets.

@sebersole
Created November 8, 2010 20:44
Show Gist options
  • Save sebersole/668226 to your computer and use it in GitHub Desktop.
Save sebersole/668226 to your computer and use it in GitHub Desktop.
public void afterCompletion(int status) {
log.trace( "transaction after completion callback [status={}]", status );
try {
afterCompletionAction.doAction( ctx, status );
final boolean wasSuccessful = ( status == Status.STATUS_COMMITTED );
jdbcContext.afterTransactionCompletion( wasSuccessful, hibernateTransaction );
}
finally {
reset();
jdbcContext.cleanUpJtaSynchronizationCallbackCoordinator();
if ( ctx.shouldAutoClose() && !ctx.isClosed() ) {
log.trace( "automatically closing session" );
ctx.managedClose();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment