/**
* INTERNAL:
*/
protected void buildRMITransportManagerConfig(RMITransportManagerConfig tmConfig, RemoteCommandManager rcm) {
RMITransportManager tm = new RMITransportManager(rcm);
// Set the transport manager. This will initialize the DiscoveryManager
// This needs to be done before we process the DiscoveryConfig.
rcm.setTransportManager(tm);
// Discovery
DiscoveryConfig discoveryConfig = tmConfig.getDiscoveryConfig();
if (discoveryConfig != null) {
processDiscoveryConfig(discoveryConfig, rcm.getDiscoveryManager());
}
if (tmConfig.getJNDINamingServiceConfig() != null) {
// JNDI naming service
tm.setNamingServiceType(TransportManager.JNDI_NAMING_SERVICE);
processJNDINamingServiceConfig(tmConfig.getJNDINamingServiceConfig(), tm);
} else if (tmConfig.getRMIRegistryNamingServiceConfig() != null) {
// RMI registry naming service
tm.setNamingServiceType(TransportManager.REGISTRY_NAMING_SERVICE);
processRMIRegistryNamingServiceConfig(tmConfig.getRMIRegistryNamingServiceConfig(), tm);
}
tm.setIsRMIOverIIOP(tmConfig instanceof RMIIIOPTransportManagerConfig);
// Send mode - Can only be Asynchronous (true) or Synchronous (false), validated by the schema
// XML Schema default is Asynchronous
rcm.setShouldPropagateAsynchronously(tmConfig.getSendMode().equals("Asynchronous"));