Methods Summary |
---|
public void | commit(javax.transaction.xa.Xid xid, boolean onePhase)Commit the global transaction specified by xid.
//the mc.transactionCompleted call has come here becasue
//the transaction *actually* completes after the flow
//reaches here. the end() method might not really signal
//completion of transaction in case the transaction is
//suspended. In case of transaction suspension, the end
//method is still called by the transaction manager
try {
xar.commit(xid, onePhase);
} catch (XAException xae) {
throw xae;
} catch (Exception e) {
throw new XAException(e.getMessage());
} finally {
mc.transactionCompleted();
}
|
public void | end(javax.transaction.xa.Xid xid, int flags)Ends the work performed on behalf of a transaction branch.
xar.end(xid, flags);
//GJCINT
//mc.transactionCompleted();
|
public void | forget(javax.transaction.xa.Xid xid)Tell the resource manager to forget about a heuristically completed transaction branch.
xar.forget(xid);
|
public int | getTransactionTimeout()Obtain the current transaction timeout value set for this
XAResource instance.
return xar.getTransactionTimeout();
|
public boolean | isSameRM(javax.transaction.xa.XAResource xares)This method is called to determine if the resource manager instance
represented by the target object is the same as the resouce manager
instance represented by the parameter xares.
return xar.isSameRM(xares);
|
public int | prepare(javax.transaction.xa.Xid xid)Ask the resource manager to prepare for a transaction commit
of the transaction specified in xid.
try {
int result = xar.prepare(xid);
//When the VOTE from resource manager is XA_RDONLY , we will not get commit() call from TxManager.
//Hence calling txCompleted.
if (result == XAResource.XA_RDONLY) {
mc.transactionCompleted();
}
return result;
} catch (XAException xae) {
mc.transactionCompleted();
throw xae;
} catch (Exception e) {
mc.transactionCompleted();
throw new XAException(e.getMessage());
}
|
public javax.transaction.xa.Xid[] | recover(int flag)Obtain a list of prepared transaction branches from a resource manager.
return xar.recover(flag);
|
public void | rollback(javax.transaction.xa.Xid xid)Inform the resource manager to roll back work done on behalf of a transaction branch
//the mc.transactionCompleted call has come here becasue
//the transaction *actually* completes after the flow
//reaches here. the end() method might not really signal
//completion of transaction in case the transaction is
//suspended. In case of transaction suspension, the end
//method is still called by the transaction manager
try {
xar.rollback(xid);
} catch (XAException xae) {
throw xae;
} catch (Exception e) {
throw new XAException(e.getMessage());
} finally {
mc.transactionCompleted();
}
|
public boolean | setTransactionTimeout(int seconds)Set the current transaction timeout value for this XAResource instance.
return xar.setTransactionTimeout(seconds);
|
public void | start(javax.transaction.xa.Xid xid, int flags)Start work on behalf of a transaction branch specified in xid.
//GJCINT
mc.transactionStarted();
xar.start(xid, flags);
|