code: private Transaction onBegin()
      {
          Transaction tx;
          if (((StatelessSessionImpl) s).getTransactionCoordinator().isTransactionActive())
          {
              tx = ((StatelessSessionImpl) s).getTransaction();
          }
          else
          {
              tx = s.beginTransaction();
          }
          return tx;
      }
docs: On begin.
  
  @return the transaction