/** * private constructor for unicicity */ private NameServiceManager() { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("NameServiceManager.NameServiceManager()"); } try { nsTable = new Hashtable(); //get rmi configuration hashtable Hashtable allRMIConfiguration = CarolConfiguration.getAllRMIConfiguration(); int nbProtocol = allRMIConfiguration.size(); for (Enumeration e = allRMIConfiguration.elements() ; e.hasMoreElements() ;) { RMIConfiguration currentConf = (RMIConfiguration)e.nextElement(); String rmiName = currentConf.getName(); NameService nsC = (NameService)Class.forName(currentConf.getNameService()).newInstance(); nsC.setPort(currentConf.getPort()); // get the Name Service nsTable.put(rmiName, nsC); } } catch (Exception e) { String msg = "NameServiceManager.NameServiceManager() fail"; TraceCarol.error(msg,e); } }