public static synchronized void CancelTransaction(String ErrorTittle, String ErroMessage) { if (Opened) { Opened = false; TransactionCanceled = true; transaction.setErrorTittle(ErrorTittle); transaction.addErrorMessage(ErroMessage); session.rollback(); } }
@Override protected void doPassivate() throws Exception { if (objectContainer != null) { objectContainer.rollback(); } }