public boolean enlistResource ( XAResource xares )
throws javax.transaction.RollbackException,
javax.transaction.SystemException, IllegalStateException
{
TransactionalResource res = null;
XATransactionalResource xatxres = null;
XAResourceTransaction restx = null;
Stack errors = new Stack ();
if ( getStatus () == Status.STATUS_MARKED_ROLLBACK ) {
String msg = "Transaction is already marked for rollback - enlisting more resources is useless.";
Configuration.logWarning ( msg );
throw new javax.transaction.RollbackException ( msg );
}
Enumeration enumm = Configuration.getResources ();
while ( enumm.hasMoreElements () ) {
RecoverableResource rres = (RecoverableResource) enumm
.nextElement ();
if ( rres instanceof XATransactionalResource ) {
xatxres = (XATransactionalResource) rres;
if ( xatxres.usesXAResource ( xares ) )
res = xatxres;
}
}