code: public void rollback(Xid xid) throws XAException
     {
        if (!xid.equals(currentXid))
        {
           throw new LocalXAException(bundle.wrongXidInRollback(currentXid, xid), XAException.XAER_PROTO);  
        }
        currentXid = null;
        try
        {
           cl.getManagedConnection().getLocalTransaction().rollback();
        }
        catch (LocalResourceException lre)
        {
           connectionManager.returnConnectionListener(cl, true);
           throw new LocalXAException(bundle.couldNotRollbackLocalTx(), XAException.XAER_RMFAIL, lre);
        }
        catch (ResourceException re)
        {
           connectionManager.returnConnectionListener(cl, true);
           throw new LocalXAException(bundle.couldNotRollbackLocalTx(), XAException.XAER_RMERR, re);
        }
     }
docs: {@inheritDoc}