+ pr.getSysMessageID() + " has "
+ consumerList.size() + " consumers ");
ConsumerUID cuid = (ConsumerUID)citr.next();
String key = pr.getSysMessageID() +
":" + cuid;
TransactionList tl = Globals.getTransactionList();
TransactionUID tid = (TransactionUID) ackLookup.get(key);
if (DEBUG) {
logger.log(logger.INFO, "loadTakeoverMsgs: lookup "+key+" found tid="+tid);
}
if (tid != null) {
boolean remote = false;
TransactionState ts = tl.retrieveState(tid);
if (ts == null) {
ts = tl.getRemoteTransactionState(tid);
remote = true;
}
if (DEBUG) {
logger.log(logger.INFO, "tid="+tid+" has state="+
TransactionState.toString(ts.getState()));
}
if (ts != null &&
ts.getState() != TransactionState.ROLLEDBACK &&
ts.getState() != TransactionState.COMMITTED) {
// in transaction ...
if (DEBUG) {
logger.log(Logger.INFO,
"loadTakeoverMsgs: Open transaction ack ["+key +"]"+
(remote?"remote":"")+", TUID="+tid);
}
if (!remote) {
try {
tl.addAcknowledgement(tid, pr.getSysMessageID(),
cuid, cuid, true, false);
} catch (TransactionAckExistException e) {
//can happen if takeover tid's remote txn after restart
//then txn ack would have already been loaded
logger.log(Logger.INFO,
Globals.getBrokerResources().getKString(
BrokerResources.I_TAKINGOVER_TXN_ACK_ALREADY_EXIST,
"["+pr.getSysMessageID()+"]"+cuid+":"+cuid,
tid+"["+TransactionState.toString(ts.getState())+"]"));
}
tl.addOrphanAck(tid, pr.getSysMessageID(), cuid);
}
citr.remove();
logger.log(Logger.INFO,"Processing open ack " +
pr.getSysMessageID() + ":" + cuid + " on " + tid);