code: public void commitTransaction() throws SystemException
     {
        Long key = Long.valueOf(Thread.currentThread().getId());
        TransactionImpl tx = txs.get(key);
        if (tx != null)
        {
           try
           {
              tx.commit();
           }
           catch (Throwable t)
           {
              SystemException se = new SystemException("Error during commit");
              se.initCause(t);
              throw se;
           }
        }
        else
        {
           throw new IllegalStateException("No transaction to commit");
        }
     }
docs: Commit a transaction
  @exception SystemException Thrown if an error occurs