code: @Override
     public void commit() throws RollbackException, HeuristicMixedException,
                                 HeuristicRollbackException, SecurityException,
                                 IllegalStateException, SystemException {
        DummyTransaction tx = getTransaction();
        if (tx == null)
           throw new IllegalStateException("thread not associated with transaction");
        tx.commit();
  
        // Disassociate tx from thread.
        setTransaction(null);
     }
docs: Commit the transaction associated with the calling thread.
  
  @throws javax.transaction.RollbackException
  If the transaction was marked for rollback only, the transaction is rolled back and
  this exception is thrown.
  @throws IllegalStateException If the calling thread is not associated with a transaction.
  @throws javax.transaction.SystemException
  If the transaction service fails in an unexpected way.
  @throws javax.transaction.HeuristicMixedException
  If a heuristic decision was made and some some parts of the transaction have been
  committed while other parts have been rolled back.
  @throws javax.transaction.HeuristicRollbackException
  If a heuristic decision to roll back the transaction was made.
  @throws SecurityException     If the caller is not allowed to commit this transaction.