Examples of NamingContext


Examples of com.toc.jndp.interfaces.NamingContext

    //Clone the JNDI Environment
    Hashtable<String, Object> env = (Hashtable<String, Object>)environment.clone();
    //Parser the JNDP URL and Configure the Environment
    String providerURL = (String)environment.get(KEY_JAVA_PROVIDER_URL_ENV);
    Name prefix = parserURL(providerURL, env);
    return new NamingContext(env, prefix, null);
  }
View Full Code Here

Examples of fr.dyade.aaa.jndi2.impl.NamingContext

                                                            evt.getUpdatedContextId()),
                                                            evt.getName(),
                                                            evt.getObject(),
                                                            from);
    }else{
      NamingContext  nc= getServerImpl().getNamingContext(evt.getPath());
      getServerImpl().bind(
                           nc,
                           evt.getName(),
                           evt.getObject(),
                           from);
View Full Code Here

Examples of fr.dyade.aaa.jndi2.impl.NamingContext

                                                              evt.getUpdatedContextId()),
                                                              evt.getName(),
                                                              evt.getObject(),
                                                              from);
    }else{
      NamingContext  nc= getServerImpl().getNamingContext(evt.getPath());
      getServerImpl().rebind(
                             nc,
                             evt.getName(),
                             evt.getObject(),
                             from);
View Full Code Here

Examples of fr.dyade.aaa.jndi2.impl.NamingContext

                             getServerImpl().getNamingContext(
                                                              evt.getUpdatedContextId()),
                                                              evt.getName(),
                                                              from);
    }else{
      NamingContext  nc= getServerImpl().getNamingContext(evt.getPath());
      getServerImpl().unbind(
                             nc,
                             evt.getName(),
                             from);
    }
View Full Code Here

Examples of fr.dyade.aaa.jndi2.impl.NamingContext

                                                                        evt.getOwnerId(),
                                                                        from);
    }else{
      CompositeName parentPath = (CompositeName) evt.getPath().clone();   
      parentPath.remove(parentPath.size() - 1);
      NamingContext  nc= getServerImpl().getNamingContext(parentPath);
      getServerImpl().createSubcontext(nc,
                                       evt.getName(),
                                       evt.getPath(),
                                       evt.getContextId(),
                                       getId(),
View Full Code Here

Examples of fr.dyade.aaa.jndi2.impl.NamingContext

                                                                         evt.getPath(),
                                                                         from);
    }else{
      CompositeName parentPath = (CompositeName) evt.getPath().clone();   
      parentPath.remove(parentPath.size() - 1);
      NamingContext  nc= getServerImpl().getNamingContext(parentPath);
      getServerImpl().destroySubcontext(
                                        nc,
                                        evt.getName(),
                                        evt.getPath(),
                                        from);
View Full Code Here

Examples of fr.dyade.aaa.jndi2.impl.NamingContext

                       "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.
      }
View Full Code Here

Examples of fr.dyade.aaa.jndi2.impl.NamingContext

    Hashtable  composite_context= new Hashtable();
    if (contexts != null) {
      Vector newNames = new Vector();
      for (int i = 0; i < contexts.length; i++) {
        if(!looseCoupling) {
          NamingContext nc = getServerImpl().getNamingContext(
                                                              contexts[i].getNamingContext().getId());
          if (nc == null) {
            getServerImpl().addNamingContext(contexts[i]);
            newNames.addElement(contexts[i].getCompositeName());
          }
          // Else the naming context has already been
          // added by an other server that is the (new)
          // owner of this context.

        } else {
          NamingContext nc;
          try{
            nc = getServerImpl().getNamingContext(contexts[i].getCompositeName());
          }catch(MissingRecordException mre){
            nc=null;
          }catch( MissingContextException mce){
            nc=null;
          }
          if(nc == null){
            nc = getServerImpl().newNamingContext( getId(),null,contexts[i].getCompositeName());
            contexts[i].getNamingContext().setOwnerId(getId());
          }

          Enumeration enumRecord = contexts[i].getNamingContext().getEnumRecord();
          while (enumRecord.hasMoreElements()) {         
            Record record =(RecordenumRecord.nextElement();
            Record r = nc.getRecord(record.getName());
            if (r == null
              nc.addRecord(record);
            if(record instanceof ContextRecord){
              CompositeName parentPath = contexts[i].getCompositeName();
              record_compositeName.put(record,parentPath);
            }
          }
          composite_context.put(contexts[i].getCompositeName(),nc);
        }
      }
      if(looseCoupling){
        Enumeration enumKeyRecord = record_compositeName.keys();
        while(enumKeyRecord.hasMoreElements()) {
          Record recor =(Record)enumKeyRecord.nextElement();
          CompositeName cn =(CompositeName)((CompositeName)(record_compositeName.get(recor))).clone();
          cn.add(recor.getName());
          if(composite_context.containsKey(cn)){
            NamingContext nc  =(NamingContext)composite_context.get(cn);
            ((ContextRecord)recor).setId(nc.getId());
          }       
        }
        Enumeration enumContext = composite_context.elements();
        while(enumContext.hasMoreElements()) {
          NamingContext nc  =(NamingContext)enumContext.nextElement();
          getServerImpl().storeNamingContext(nc);
        }
      }

View Full Code Here

Examples of gov.nasa.arc.mct.gui.NamingContext

      @Override
      public void setCanvasContextTitleList(List<String> s) { if(!s.isEmpty()) naming = s.get(0); }
      public void setPanelContextTitleList(List<String> s) { if(!s.isEmpty()) naming = s.get(0); }
    });
   
    NamingContext nullContext = Mockito.mock(NamingContext.class);
    NamingContext blankContext = Mockito.mock(NamingContext.class);
    NamingContext specificContext = Mockito.mock(NamingContext.class);
   
    PropertyChangeEvent event = Mockito.mock(PropertyChangeEvent.class);
   
    Mockito.when(nullContext.getContextualName()).thenReturn(null);
    Mockito.when(blankContext.getContextualName()).thenReturn("");
    Mockito.when(specificContext.getContextualName()).thenReturn("Specific");
   
    manifestation.setNamingContext(nullContext);
    manifestation.updateMonitoredGUI(event);
    Assert.assertEquals(naming, "");
   
View Full Code Here

Examples of org.apache.naming.NamingContext

            if (initialized)
                return;

            Hashtable<String, Object> contextEnv = new Hashtable<>();
            try {
                namingContext = new NamingContext(contextEnv, getName());
            } catch (NamingException e) {
                // Never happens
            }
            ContextAccessController.setSecurityToken(getName(), container);
            ContextBindings.bindContext(container, namingContext, container);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.