code: public boolean isOpen()
      {
          return (getStatus() == Status.STATUS_ACTIVE ||
                  getStatus() == Status.STATUS_MARKED_ROLLBACK ||
                  getStatus() == Status.STATUS_PREPARED ||
                  getStatus() == Status.STATUS_PREPARING ||
                  getStatus() == Status.STATUS_COMMITTING);
      }
docs: Determine whether the transaction is open or not. A transaction is open if
  a call has been made to <code>begin</code> , but a subsequent call to
  either <code>commit</code> or <code>abort</code> has not been made.
  @return    True if the transaction is open, otherwise false.