// Search all directly accessible domains.
for (Enumeration n = root.networks.elements(); n.hasMoreElements();) {
A3CMLNetwork network = (A3CMLNetwork) n.nextElement();
A3CMLDomain domain = getConfig().getDomain(network.domain);
// Creates the corresponding MessageConsumer.
try {
Network consumer = (Network) Class.forName(domain.network).newInstance();
// Initializes it with domain description. Be careful, this array
// is kept in consumer, don't reuse it!!
consumer.init(domain.name, network.port, domain.getServersId());
if (consumer instanceof SimpleNetwork && jgroups != null) {
//NTA modify to SimpleHANetwork
((SimpleNetwork) consumer).setJGroups(jgroups);
jgroups.setNetWork((SimpleNetwork) consumer);
}