Methods Summary |
---|
public void | commit(javax.transaction.xa.Xid xid, boolean onePhase)
_logger = LogDomains.getLogger(LogDomains.RSR_LOGGER);
print("XAResource.commit: " + xidToString(xid) + "," + onePhase);
res.commit(xid, onePhase);
|
public void | end(javax.transaction.xa.Xid xid, int flags)
print("XAResource.end: " + xidToString(xid) + "," +
flagToString(flags));
res.end(xid, flags);
|
public boolean | equals(java.lang.Object obj)
if (this == obj) return true;
if (obj == null) return false;
if (obj instanceof XAResourceWrapper) {
XAResource other = ((XAResourceWrapper) obj).res;
return res.equals(other);
}
if (obj instanceof XAResource) {
XAResource other = (XAResource) obj;
return res.equals(other);
}
return false;
|
private static java.lang.String | flagToString(int flag)
switch (flag) {
case TMFAIL:
return "TMFAIL";
case TMJOIN:
return "TMJOIN";
case TMNOFLAGS:
return "TMNOFLAGS";
case TMONEPHASE:
return "TMONEPHASE";
case TMRESUME:
return "TMRESUME";
case TMSTARTRSCAN:
return "TMSTARTRSCAN";
case TMENDRSCAN:
return "TMENDRSCAN";
case TMSUCCESS:
return "TMSUCCESS";
case TMSUSPEND:
return "TMSUSPEND";
case XA_RDONLY:
return "XA_RDONLY";
default:
return "" + Integer.toHexString(flag);
}
|
public void | forget(javax.transaction.xa.Xid xid)
print("XAResource.forget: " + xidToString(xid));
res.forget(xid);
|
public int | getTransactionTimeout()
return res.getTransactionTimeout();
|
public int | hashCode()
return res.hashCode();
|
public boolean | isSameRM(javax.transaction.xa.XAResource xares)
if (xares instanceof XAResourceWrapper) {
XAResourceWrapper other = (XAResourceWrapper) xares;
boolean result = res.isSameRM(other.res);
print("XAResource.isSameRM: " + res + "," + other.res + "," +
result);
return result;
} else {
boolean result = res.isSameRM(xares);
print("XAResource.isSameRM: " + res + "," + xares + "," +
result);
return result;
//throw new IllegalArgumentException("Has to use XAResourceWrapper for all XAResource objects: " + xares);
}
|
public int | prepare(javax.transaction.xa.Xid xid)
print("XAResource.prepare: " + xidToString(xid));
int result = res.prepare(xid);
print("prepare result = " + flagToString(result));
return result;
|
private void | print(java.lang.String s)
_logger.log(Level.FINE,s);
|
public javax.transaction.xa.Xid[] | recover(int flag)
print("XAResource.recover: " + flagToString(flag));
return res.recover(flag);
|
public void | rollback(javax.transaction.xa.Xid xid)
print("XAResource.rollback: " + xidToString(xid));
res.rollback(xid);
|
public boolean | setTransactionTimeout(int seconds)
return res.setTransactionTimeout(seconds);
|
public void | start(javax.transaction.xa.Xid xid, int flags)
print("XAResource.start: " + xidToString(xid) + "," +
flagToString(flags));
res.start(xid, flags);
|
private static java.lang.String | xidToString(javax.transaction.xa.Xid xid)
return String.valueOf((new String(xid.getGlobalTransactionId()) +
new String(xid.getBranchQualifier())).hashCode());
|