/** * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { if (getBackendController(context).isUnitOfWorkActive()) { getBackendController(context).rollbackUnitOfWork(); } return actionHandler.execute(delegate, context); }
/** * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { if (!getBackendController(context).isUnitOfWorkActive()) { getBackendController(context).beginUnitOfWork(); } try { return super.execute(actionHandler, context); } catch (RuntimeException ex) { getBackendController(context).rollbackUnitOfWork(); throw ex; } }