getStateRespCmd.setCommands(command.getCommands());
return getStateRespCmd;
} catch (ClusteringFault e) {
String errMsg = "Cannot handle initialization request";
log.error(errMsg, e);
throw new RemoteProcessException(errMsg, e);
}
} else if (msg instanceof GetConfigurationCommand) {
// If a GetConfigurationCommand is received by a node which has not yet initialized
// this node cannot send a response to the state requester. So we simply return.
if (configurationContext.
getPropertyNonReplicable(ClusteringConstants.CLUSTER_INITIALIZED) == null) {
return null;
}
try {
log.info("Received " + msg + " initialization request message from " +
TribesUtil.getName(invoker));
GetConfigurationCommand command = (GetConfigurationCommand) msg;
command.execute(configurationContext);
GetConfigurationResponseCommand
getConfigRespCmd = new GetConfigurationResponseCommand();
getConfigRespCmd.setServiceGroups(command.getServiceGroupNames());
return getConfigRespCmd;
} catch (ClusteringFault e) {
String errMsg = "Cannot handle initialization request";
log.error(errMsg, e);
throw new RemoteProcessException(errMsg, e);
}
}
return null;
}