if (log.isTraceEnabled()) { log.trace("In AddMessageSynchronization.beforeCompletion()"); }
      public void beforeCompletion()      {         try         {            // this call is executed with the transaction context of the transaction            // that is being committed            Transaction crtTransaction = tm.getTransaction();            if (crtTransaction.getStatus() == Status.STATUS_MARKED_ROLLBACK)            {               return;            }            // enable delivery            commit(txID);         }         catch(SystemException e)         {            // not much to do, just log the exception            log.error("Current transaction failed", e);            try            {               rollback(txID);            }            catch(SystemException se)            {               log.error("Rollback failed", se);            }         }      }