Examples of createSubcontext()


Examples of javax.naming.Context.createSubcontext()

      Name name = ictx.getNameParser( jndiName ).parse( jndiName );
      Context ctx = ictx;
      for (int i = 0, max = name.size() - 1; i < max; i++)
      {
    try
    { ctx = ctx.createSubcontext( name.get( i ) ); }
    catch (NameAlreadyBoundException ignore)
    { ctx = (Context) ctx.lookup( name.get( i ) ); }
      }

       ictx.rebind( jndiName, combods );
View Full Code Here

Examples of javax.naming.Context.createSubcontext()

      sipCtx = (Context) compCtx.createSubcontext("sip");
    }

    if (!"/".equals(_name) && !"".equals(_name))
    {
      sipCtx.createSubcontext(_name);
      compCtx.bind(JNDI_SIP_PREFIX + _name + JNDI_SIP_FACTORY_POSTFIX, _context.getSipFactory());
      compCtx.bind(JNDI_SIP_PREFIX + _name + JNDI_TIMER_SERVICE_POSTFIX, _context.getTimerService());
      compCtx.bind(JNDI_SIP_PREFIX + _name + JNDI_SIP_SESSIONS_UTIL_POSTFIX, _context.getSipSessionsUtil());
    }
    else
View Full Code Here

Examples of javax.naming.Context.createSubcontext()

            // create intermediate contexts
            for (int i = 1; i < parsedName.size(); i++) {
                Name contextName = parsedName.getPrefix(i);
                if (!bindingExists(context, contextName)) {
                    context.createSubcontext(contextName);
                }
            }

            // bind
            context.bind(jndiName, value);
View Full Code Here

Examples of javax.naming.InitialContext.createSubcontext()

         InitialContext context = new InitialContext(properties);
         if (fillNames) {
            context.bind("first", new String("first"));
            context.bind("second", new String("first"));
            context.bind("third", new String("first"));
            context.createSubcontext("dir1");
            context.createSubcontext("dir2");
            context.createSubcontext("dir3");
            context.bind("dir1/first", new String("first"));
            context.bind("dir1/second", new String("first"));
            context.bind("dir1/third", new String("first"));
View Full Code Here

Examples of javax.naming.InitialContext.createSubcontext()

         if (fillNames) {
            context.bind("first", new String("first"));
            context.bind("second", new String("first"));
            context.bind("third", new String("first"));
            context.createSubcontext("dir1");
            context.createSubcontext("dir2");
            context.createSubcontext("dir3");
            context.bind("dir1/first", new String("first"));
            context.bind("dir1/second", new String("first"));
            context.bind("dir1/third", new String("first"));
                    
View Full Code Here

Examples of javax.naming.InitialContext.createSubcontext()

            context.bind("first", new String("first"));
            context.bind("second", new String("first"));
            context.bind("third", new String("first"));
            context.createSubcontext("dir1");
            context.createSubcontext("dir2");
            context.createSubcontext("dir3");
            context.bind("dir1/first", new String("first"));
            context.bind("dir1/second", new String("first"));
            context.bind("dir1/third", new String("first"));
                    
            Context ctx = (Context)context.lookup("dir2");
View Full Code Here

Examples of javax.naming.InitialContext.createSubcontext()

      Properties env = new Properties();
      env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      env.setProperty(Context.PROVIDER_URL, "jnp://localhost:10999/");
      env.setProperty("jnp.disableDiscovery", "true");
      InitialContext ctx = new InitialContext(env);
      ctx.createSubcontext("foo");
      try
      {
         ctx.createSubcontext("foo");
         fail("Second createSubcontext(foo) did NOT fail");
      }
View Full Code Here

Examples of javax.naming.InitialContext.createSubcontext()

      env.setProperty("jnp.disableDiscovery", "true");
      InitialContext ctx = new InitialContext(env);
      ctx.createSubcontext("foo");
      try
      {
         ctx.createSubcontext("foo");
         fail("Second createSubcontext(foo) did NOT fail");
      }
      catch (NameAlreadyBoundException e)
      {
         getLog().debug("Second createSubcontext(foo) failed as expected");
View Full Code Here

Examples of javax.naming.InitialContext.createSubcontext()

      }
      catch (NameAlreadyBoundException e)
      {
         getLog().debug("Second createSubcontext(foo) failed as expected");
      }
      ctx.createSubcontext("foo/bar");
      ctx.unbind("foo/bar");
      ctx.unbind("foo");
   }

   /** Lookup a name to test basic connectivity and lookup of a known name
View Full Code Here

Examples of javax.naming.InitialContext.createSubcontext()

    */
   public void testCreateSubcontext() throws Exception
   {
      getLog().debug("+++ testCreateSubcontext");
      InitialContext ctx = getInitialContext();
      ctx.createSubcontext("foo");
      try
      {
         ctx.createSubcontext("foo");
         fail("Second createSubcontext(foo) did NOT fail");
      }
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.