public static void abort(final NakedObjectTransactionManager transactionManager, final FacetHolder holder) { LOG.info("exception executing " + holder + ", aborting transaction"); try { transactionManager.abortTransaction(); } catch (final Exception e2) { LOG.error("failure during abort", e2); } }
private void installFixtureInTransaction(final Object fixture) { getServicesInjector().injectDependencies(fixture); installFixtures(getFixtures(fixture)); // now, install the fixture itself try { LOG.info("installing fixture: " + fixture); getTransactionManager().startTransaction(); installFixture(fixture); saveLogonFixtureIfRequired(fixture); getTransactionManager().endTransaction(); LOG.info("fixture installed"); } catch (final RuntimeException e) { LOG.error("installing fixture " + fixture.getClass().getName() + " failed; aborting ", e); try { getTransactionManager().abortTransaction(); } catch (final Exception e2) { LOG.error("failure during abort", e2); } throw e; } }
private static NakedObject save(final View view) { final NakedObject transientObject = view.getContent().getNaked(); try { getTransactionManager().startTransaction(); getPersistenceSession().makePersistent(transientObject); getTransactionManager().endTransaction(); } catch (final RuntimeException e) { LOG.info("exception saving " + transientObject + ", aborting transaction", e); try { getTransactionManager().abortTransaction(); } catch (final Exception e2) { LOG.error("failure during abort", e2); } throw e; } return transientObject; }
} catch (final RuntimeException e) { LOG.info("abort transaction", e); getTransactionManager().abortTransaction(); throw e;
} catch (final RuntimeException e) { LOG.info("abort transaction", e); getTransactionManager().abortTransaction(); throw e;
getTransactionManager().abortTransaction(); return; } catch (final Exception e) {
getTransactionManager().abortTransaction(); return; } catch (final Exception e) {