Skip to content

Instantly share code, notes, and snippets.

@emmanuelbernard
Created April 7, 2011 07:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emmanuelbernard/907193 to your computer and use it in GitHub Desktop.
Save emmanuelbernard/907193 to your computer and use it in GitHub Desktop.
//old
public void flush() {
try {
if ( !isTransactionInProgress() ) {
throw new TransactionRequiredException( "no transaction is in progress" );
}
getSession().flush();
}
catch ( RuntimeException e ) {
throw convert( e );
}
}
//new
public void flush() {
if ( !isTransactionInProgress() ) {
throw new TransactionRequiredException( "no transaction is in progress" );
}
try {
getSession().flush();
}
catch ( RuntimeException e ) {
throw convert( e );
}
}
@scottmarlow
Copy link

Thanks, suggested patch applied to my branches for HHH-6095

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment