public void changeOwner(CompositeName name, Object newOwnerId) throws NamingException { NamingContextInfo[] contexts = contextManager.changeOwner( name, serverId, newOwnerId); if (updateListener != null) { updateListener.onUpdate( new ChangeOwnerEvent( newOwnerId, contexts)); } }
private void onUpdateEvent(AgentId from, ChangeOwnerEvent evt) throws NamingException { if (Trace.logger.isLoggable(BasicLevel.DEBUG)) Trace.logger.log(BasicLevel.DEBUG, "ReplicationManager.onUpdateEvent(" + from + ',' + evt + ')'); NamingContextInfo[] contexts = evt.getNamingContexts(); for (int i = 0; i < contexts.length; i++) { NamingContext nc = getServerImpl().getNamingContext( contexts[i].getNamingContext().getId()); if (nc == null) { // The InitJndiServerNot sent by // the server that created this context may not // have been received. getServerImpl().addNamingContext(contexts[i]); // TODO : NTA uncomment and implement retryRequestsWaitingForMissingContext // retryRequestsWaitingForMissingContext( // contexts[i].getNamingContext().getId()); } else { nc.setOwnerId(contexts[i].getNamingContext().getOwnerId()); getServerImpl().resetNamingContext( contexts[i].getNamingContext()); // DF: must retry the sync and write // requests to the new owner. } } }
private void onUpdateEvent(AgentId from, ChangeOwnerEvent evt) throws NamingException { if (Trace.logger.isLoggable(BasicLevel.DEBUG)) Trace.logger.log(BasicLevel.DEBUG, "ReplicationManager.onUpdateEvent(" + from + ',' + evt + ')'); NamingContextInfo[] contexts = evt.getNamingContexts(); for (int i = 0; i < contexts.length; i++) { NamingContext nc = getServerImpl().getNamingContext( contexts[i].getNamingContext().getId()); if (nc == null) { // The InitJndiServerNot sent by // the server that created this context may not // have been received. getServerImpl().addNamingContext(contexts[i]); // TODO : NTA uncomment and implement retryRequestsWaitingForMissingContext // retryRequestsWaitingForMissingContext( // contexts[i].getNamingContext().getId()); } else { nc.setOwnerId(contexts[i].getNamingContext().getOwnerId()); getServerImpl().resetNamingContext( contexts[i].getNamingContext()); // DF: must retry the sync and write // requests to the new owner. } } }
public void changeOwner(CompositeName name, Object newOwnerId) throws NamingException { NamingContextInfo[] contexts = contextManager.changeOwner( name, serverId, newOwnerId); if (updateListener != null) { updateListener.onUpdate( new ChangeOwnerEvent( newOwnerId, contexts)); } }