/** * Returns the list of Provider URL. * * @param protocolName * a name of protocol * @return providers of the cluster view for the protocol with the given * name * @throws ServerClusterViewManagerException * if none provider exists for the protocol with the given name */ public final List<String> getProviderURLs(final String protocolName) throws ServerClusterViewManagerException { String providerName = getConfig().getClientProviderName(); ArrayList<String> providerURLs = new ArrayList<String>(); try { for (CMIReference cmiReference : getCMIReferences(providerName, protocolName)) { providerURLs.add(cmiReference.getServerRef().getProviderURL()); } } catch (ObjectNotFoundException e) { LOGGER.error( "Cannot get CMIReferences for the provider whith name {0}", providerName, e); throw new ServerClusterViewManagerException( "Cannot get CMIReferences for the provider whith name " + providerName, e); } return providerURLs; }
/** * Updates informations about clustering for the object with the given name. * @param objectName a name of object * @throws RemoteException * @throws ObjectNotFoundException if none object has the given name */ public void pullAndUpdateObjectInfos(final String objectName) throws RemoteException, ObjectNotFoundException { LOGGER.debug("Updating infos for: {0} - thread is {1}", objectName, Thread.currentThread().getName()); synchronized (clientClusterViewCache) { if(objectName.equals(getConfig().getClientProviderName()) && clientClusterViewCache.getClusteredObject(objectName).getCMIReferences().isEmpty()) { LOGGER.warn("No provider URLs found for the provider, trying with the initials: ", providerServerRefs); clientClusterViewCache.getClusteredObject(objectName).setCMIReferences(providerServerRefs); } pullAddUpdateReplicationInfos(objectName); pullAndUpdatePolicy(objectName); pullAndUpdateCMIReferences(objectName); } }
if (ctxt != null) { try { ctxt.unbind(getConfig().getClientProviderName()); } catch (NamingException e) { LOGGER.warn("Cannot unbind the instance of ClientClusterViewProvider for the protocol {0}",
String bindName = getConfig().getClientProviderName();
String providerName = getConfig().getClientProviderName();
protocolConfiguration.getProtocol(), providerUrls, ((IConfig) cmiConfig.getClusterViewManagerFactoryConfig().getConfig()).getClientProviderName())) { return false;