if (flag == XAResource.TMSTARTRSCAN || flag == XAResource.TMENDRSCAN)
throw new XAException("Non supported recovery flag: " + flag);
try {
XACnxRecoverReply reply =
(XACnxRecoverReply) cnx.syncRequest(new XACnxRecoverRequest());
if (reply == null) {
return new Xid[0];
}
Xid[] xids = new Xid[reply.getSize()];
for (int i = 0; i < reply.getSize(); i++) {
xids[i] = new XidImpl(reply.getBranchQualifier(i),
reply.getFormatId(i),
reply.getGlobalTransactionId(i));
transactions.put(xids[i], new XAContext());
setStatus(xids[i], PREPARED);
}
return xids;
} catch (Exception exc) {