code: public void commit() throws RollbackException,
                                 HeuristicMixedException,
                                 HeuristicRollbackException,
                                 SecurityException,
                                 IllegalStateException,
                                 SystemException
     {
        if (status == Status.STATUS_UNKNOWN)
           throw new IllegalStateException("Status unknown");
  
        if (status == Status.STATUS_MARKED_ROLLBACK)
           throw new IllegalStateException("Status marked rollback");
  
        finish(true);
     }
docs: {@inheritDoc}