code: @Override
    public void rollback(Xid xid) throws XAException {
      synchronized (cpoXaStateMap) {
        CpoXaState<T> cpoXaState = cpoXaStateMap.getXidStateMap().get(xid);
  
        if (cpoXaState == null)
          throw CpoXaError.createXAException(CpoXaError.XAER_NOTA, "Unknown XID");
  
        if (cpoXaState.getAssociation()==CpoXaState.XA_UNASSOCIATED) {
          rollbackResource(cpoXaState.getResource());
          cpoXaState.setPrepared(false);
          cpoXaState.setSuccess(true);
        } else {
          throw CpoXaError.createXAException(CpoXaError.XAER_PROTO, "Rollback can only be called on an unassociated XID");
        }
      }
    }
docs: Informs the resource manager to roll back work done on behalf of a transaction branch.
  
  @param xid - A global transaction identifier.
  @throws XAException - An error has occurred. Possible XAExceptions are XA_HEURHAZ, XA_HEURCOM, XA_HEURRB, XA_HEURMIX, XAER_RMERR, XAER_RMFAIL, XAER_NOTA,
  XAER_INVAL, or XAER_PROTO.
  <p>
  If the transaction branch is already marked rollback-only the resource manager may throw one of the XA_RB* exceptions. Upon return, the resource manager
  has rolled back the branch's work and has released all held resources.