private boolean checkRefRequeued(TransactionUID id,
PacketReference ref, SysMessageID sysid)
throws BrokerException {
HashMap addrmap = translist.retrieveAckBrokerAddresses(id);
BrokerAddress oldAddr = (BrokerAddress)addrmap.get(sysid);
if (ref == null && Destination.isLocked(sysid)) {
logger.log(logger.WARNING, "Message "+sysid+
((oldAddr==null)? "":" ("+oldAddr+")")+" is in takeover, TUID="+id);
return true;
}
if (ref == null) {
logger.log(logger.WARNING,
Globals.getBrokerResources().getKString(
BrokerResources.X_MESSAGE_REF_GONE, sysid)+
" "+((oldAddr==null)? "":" ("+oldAddr+")")+", TUID="+id);
return false;
}
if (ref.isOverrided()) return true;
BrokerAddress currAddr = ref.getAddress();
if (oldAddr == null && currAddr == null) return false;
if ((oldAddr == null && currAddr != null) ||
(oldAddr != null && currAddr == null)) return true;
if (!oldAddr.equals(currAddr)) return true;
UID oldUID = oldAddr.getBrokerSessionUID();
UID currUID = currAddr.getBrokerSessionUID();
if (oldUID == null || currUID == null) return false;
if (!oldUID.equals(currUID)) return true;
return false;
}