public void createService() throws FioranoException {
    try {
      System.setProperty("java.rmi.server.hostname", RmiConnectorConfig.getConfig().getHostname());
      // Start Naming Service first.
      FioranoRMIMasterSocketFactory masterfac = FioranoRMIMasterSocketFactory.getInstance();
      List factories =
          masterfac.getSocketFactories(
              "FioranoRMIServerSocketFactory", "FioranoRMIClientSocketFactory");

      csf = (RMIClientSocketFactory) factories.get(0);
      ssf = (RMIServerSocketFactory) factories.get(1);
      setRmiRegistryIpAddress(); // ---->do before starting fiorano naming service !
      // namingService = new FioranoNamingService(rmiConnectorConfig.getRmiRegistryPort(),csf,ssf);
      namingService =
          new FioranoNamingService(RmiConnectorConfig.getConfig().getRmiRegistryPort(), csf, ssf);
      namingService.start();
      System.out.println(
          "RMI registry listening on " + RmiConnectorConfig.getConfig().getRmiRegistryPort());
    } catch (Exception ex) {

    }
  }
 public RmiConnectorConfig getRmiConnectorConfig() {
   return RmiConnectorConfig.getConfig();
 }