Skip to content

Instantly share code, notes, and snippets.

@dustingetz
Created February 21, 2011 15:36
Show Gist options
  • Select an option

  • Save dustingetz/837213 to your computer and use it in GitHub Desktop.

Select an option

Save dustingetz/837213 to your computer and use it in GitHub Desktop.
IDBConnection conn = appContext.getDbConnection();
IDBTransactionManager transaction = conn.getTransactionManager();
transaction.begin();
try
{
doSave(tmfObject, revision, appContext);
assert false:"bust the transaction";
checkIntegrity(appContext);
transaction.commit();
}
catch (Exception e)
{
transaction.rollback();
throw e;
}
finally
{
transaction.close();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment