use of com.sun.messaging.jmq.jmsserver.multibroker.raptor.ClusterFirstInfoInfo in project openmq by eclipse-ee4j.
the class ClusterImpl method processFirstInfoPacket.
protected void processFirstInfoPacket(GPacket gp, BrokerLink link) {
try {
if (!Globals.useSharedConfigRecord()) {
// should never happen
throw new BrokerException("Unexpected " + ProtocolGlobals.getPacketTypeDisplayString(gp.getType()) + " packet from " + link.getRemote());
}
ClusterFirstInfoInfo cii = ClusterFirstInfoInfo.newInstance(gp);
ChangeRecordInfo cri = cii.getLastStoredChangeRecord();
if (cri == null) {
return;
}
logger.log(logger.INFO, br.getKString(br.I_CLUSTER_RECEIVED_FIRST_INFO, ProtocolGlobals.getPacketTypeDisplayString(gp.getType()) + "[(sharecc)" + cri.toString() + "]", link.getRemote()));
cb.syncChangeRecordOnJoin(link.getRemote(), cri);
} catch (Exception e) {
logger.logStack(logger.ERROR, e.getMessage(), e);
if (e instanceof BrokerException) {
if (((BrokerException) e).getStatusCode() == Status.PRECONDITION_FAILED) {
link.shutdown();
return;
}
}
link.closeConn();
}
}
use of com.sun.messaging.jmq.jmsserver.multibroker.raptor.ClusterFirstInfoInfo in project openmq by eclipse-ee4j.
the class ClusterImpl method getFirstInfoPacket.
protected GPacket getFirstInfoPacket() {
if (!Globals.useSharedConfigRecord()) {
return null;
}
ChangeRecordInfo cri = cb.getLastStoredChangeRecord();
if (cri == null) {
return null;
}
ClusterFirstInfoInfo cii = ClusterFirstInfoInfo.newInstance();
cii.setLastStoredChangeRecord(cri);
cii.setBroadcast(false);
return cii.getGPacket();
}
Aggregations