code: private void setRollbackOnly()
     {
        try
        {
           tm.getTransaction().setRollbackOnly();
        }
        catch (IllegalStateException e)
        {
           log.warn("Could not set the status of the tx to 'rollback-only'", e);
        }
        catch (SystemException e)
        {
           log.warn("Could not set the status of the tx to 'rollback-only'", e);
        }
     }
docs: Change the status of the tx to 'rollback-only'