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