if (oldTx != null)
if (oldTx != null && tm != null)
      private void end() throws Exception      {         try         {            if (Status.STATUS_MARKED_ROLLBACK == tm.getStatus())            {               tm.rollback();            }            else            {               tm.commit();            }         }         finally         {            if (oldTx != null)            {               tm.resume(oldTx);            }         }      }