receiver.setStatsCollector(statsCollector);
}
router.setDefaultSenderFactory(transport.createOutbound(executor, statsCollector));
RoutingStrategy strategy = (RoutingStrategy)clusterDefinition.getRoutingStrategy();
KeySource<?> keySource = clusterDefinition.getKeySource();
if (keySource != null)
container.setKeySource(keySource);
// there is only an inbound strategy if we have an Mp (that is, we aren't an adaptor) and
// we actually accept messages
if (messageProcessorPrototype != null && acceptedMessageClasses != null && acceptedMessageClasses.size() > 0)
strategyInbound = strategy.createInbound(clusterSession,currentClusterId,acceptedMessageClasses, thisDestination,container);
// this can fail because of down cluster manager server ... but it should eventually recover.
try { router.initialize(); }
catch (ClusterInfoException e)
{