}
for (int i = 0; i < txnAcks.length; i++) {
TransactionAcknowledgement txnAck = txnAcks[i];
DestinationUID destId = destIds[i];
SysMessageID mid = txnAck.getSysMessageID();
ConsumerUID iid = txnAck.getStoredConsumerUID();
//Destination dest = Destination.getDestination(destId);
// make sure it is loaded
int type = (destId.isQueue() ? DestType.DEST_TYPE_QUEUE
: DestType.DEST_TYPE_TOPIC);
Destination dest = Destination.getDestination(destId.getName(),
type, true, true);
dest.load();
PacketReference pr = dest.getMessage(mid);
if (pr == null) {
// could have been acknowledged already?
// TO DO check this further
String msg = " could not find packet for replayed message ack "
+ txnAck + " dest " + destId + " in transaction " + tid;
logger.log(Logger.WARNING, msg);
} else {
if (msgStore.containsMessage(destId, mid)) {
logger
.log(logger.FORCE,
BrokerResources.I_UPDATE_INT_STATE_TXNLOG,
iid, mid);
// For Queue, ensure the stored ConsumerUID is 0 otherwise
// use try using the correct value; see bug 6516160
if (dest.isQueue() && iid.longValue() != 0) {
msgStore.updateInterestState(destId, mid, PacketReference
.getQueueUID(),
Store.INTEREST_STATE_ACKNOWLEDGED, false);
} else {
msgStore.updateInterestState(destId, mid, iid,