}
public Xid enlistResource(XAResource resource, Xid xid)
throws WSATException {
WSATGatewayRM wsatgw = WSATGatewayRM.getInstance();
if (wsatgw == null) throw new WSATException("WS-AT gateway not deployed.");
Transaction transaction = WSATHelper.getInstance().getFromXidToTransactionMap(xid);
try {
return wsatgw.registerWSATResource(xid, resource, transaction);
} catch (IllegalStateException e) {
throw new WSATException(e);
} catch (RollbackException e) {
throw new WSATException(e);
} catch (SystemException e) {
throw new WSATException(e);
}
}