code: public void setRollbackOnly() throws IllegalStateException,
                                          SystemException
     {
        Transaction tx = registry.getTransaction();
  
        if (tx == null)
           throw new IllegalStateException();
  
        tx.setRollbackOnly();
     }
docs: {@inheritDoc}