/** * Binds a dummy registry to enable the load-balancing of JNDI accesses to unclustered objects. * @param serverRef a reference on the local registry */ private void bindDummyRegistry(final ServerRef serverRef) { String bindName = CMIConfig.getBindNameForDummyRegistry(); // Create an instance of CMIReference for this object CMIReference cmiReference = new CMIReference(serverRef, bindName); addObjectInstance(clusteredObjectInfoForDummyRegistry, cmiReference); }
public void unbind(final String name) throws NamingException { LOGGER.debug("unbind {0}", name); if(serverModeEnabled) { LOGGER.debug("Server mode enabled"); // Verify that replication is activated if(replicationEnabled) { // Tests if the object is clustered boolean isClustered = clusterViewManager.isClustered(name); if(isClustered) { LOGGER.debug("{0} is clustered", name); ((ServerClusterViewManager) clusterViewManager).removeCMIReference( new CMIReference(localRegistry, name)); } } localContext.unbind(name); } else { LOGGER.warn("Cannot unbind because server mode is not activated."); } }
CMIReference cmiReference = new CMIReference(localRegistry, name);