/** * Instantiate Service Locator client. After successful instantiation * establish a connection to the Service Locator server. This method will be * called if property locatorClient is null. For this purpose was defined * additional properties to instantiate ServiceLocatorImpl. * * @throws InterruptedException * @throws ServiceLocatorException */ public void initLocator() throws InterruptedException, ServiceLocatorException { if (locatorClient == null) { if (LOG.isLoggable(Level.FINE)) { LOG.fine("Instantiate locatorClient client for Locator Server " + locatorEndpoints + "..."); } ServiceLocatorImpl client = new ServiceLocatorImpl(); client.setLocatorEndpoints(locatorEndpoints); client.setConnectionTimeout(connectionTimeout); client.setSessionTimeout(sessionTimeout); locatorClient = client; locatorClient.connect(); } }
/** * Instantiate Service Locator client. After successful instantiation * establish a connection to the Service Locator server. This method will be * called if property locatorClient is null. For this purpose was defined * additional properties to instantiate ServiceLocatorImpl. * * @throws InterruptedException * @throws ServiceLocatorException */ public void initLocator() throws InterruptedException, ServiceLocatorException { if (locatorClient == null) { if (LOG.isLoggable(Level.FINE)) { LOG.fine("Instantiate locatorClient client for Locator Server " + locatorEndpoints + "..."); } ServiceLocatorImpl client = new ServiceLocatorImpl(); client.setLocatorEndpoints(locatorEndpoints); client.setConnectionTimeout(connectionTimeout); client.setSessionTimeout(sessionTimeout); if (null != authenticationName) client.setName(authenticationName); if (null != authenticationPassword) client.setPassword(authenticationPassword); locatorClient = client; locatorClient.connect(); } }