}
private void receiveBrokerInfoReply(BrokerAddressImpl sender, GPacket gp, String realRemote) {
BrokerInfo info = null;
try {
ClusterBrokerInfoReply cbi = ClusterBrokerInfoReply.newInstance(gp);
info = cbi.getBrokerInfo();
info.setRealRemoteString(realRemote);
if (DEBUG) {
logger.log(Logger.DEBUG, "Received BROKER_INFO_REPLY from "+sender);
}
if (!info.getBrokerAddr().equals(sender)) {
logger.log(Logger.ERROR, BrokerResources.E_INTERNAL_BROKER_ERROR,
"mismatched BROKER_INFO ("+info.getBrokerAddr()+") from "+sender);
throw new BrokerException("mismatched BROKER_INFO");
}
if (Globals.getHAEnabled() && cbi.isTakingover()) {
String msg = br.getKString(BrokerResources.E_CLUSTER_TAKINGOVER_NOTIFY_RESTART, sender);
BrokerException ex = new BrokerException(msg);
logger.log(logger.ERROR, msg);
Broker.getBroker().exit(Globals.getBrokerStateHandler().getRestartCode(), msg,
BrokerEvent.Type.RESTART, null, true, true, true);