Examples of createSubcontext()


Examples of javax.naming.ldap.LdapContext.createSubcontext()

        ocls.add( "top" );
        ocls.add( "person" );
        vicious.put( ocls );
        vicious.put( "cn", "x*y*z*" );
        vicious.put( "sn", "x*y*z*" );
        ctx.createSubcontext( "cn=x*y*z*", vicious );

        SearchControls controls = new SearchControls();
        controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
        controls.setReturningAttributes( new String[]
            { "cn" } );
View Full Code Here

Examples of javax.naming.ldap.LdapContext.createSubcontext()

        groupOfNames.put( "cn", "groupOfNames" );
        Attribute member = new BasicAttribute( "member" );
        member.add( "uid=test,ou=system" );
        member.add( "uid=r\u00e9dacteur1,ou=system" );
        groupOfNames.put( member );
        ctx.createSubcontext( "cn=groupOfNames", groupOfNames );

        Attributes groupOfUniqueNames = new BasicAttributes( true );
        Attribute groupOfUniqueNamesOC = new BasicAttribute( "objectClass" );
        groupOfUniqueNamesOC.add( "top" );
        groupOfUniqueNamesOC.add( "groupOfUniqueNames" );
View Full Code Here

Examples of javax.naming.ldap.LdapContext.createSubcontext()

        groupOfUniqueNames.put( "cn", "groupOfUniqueNames" );
        Attribute uniqueMember = new BasicAttribute( "uniqueMember" );
        uniqueMember.add( "uid=test,ou=system" );
        uniqueMember.add( "uid=r\u00e9dacteur1,ou=system" );
        groupOfUniqueNames.put( uniqueMember );
        ctx.createSubcontext( "cn=groupOfUniqueNames", groupOfUniqueNames );

        SearchControls controls = new SearchControls();
        NamingEnumeration<SearchResult> res;

        // search with unicode filter value
View Full Code Here

Examples of org.apache.directory.server.core.jndi.ServerLdapContext.createSubcontext()

        // set up
        Attributes attributes = new BasicAttributes( "objectClass", "top", true );
        attributes.get( "objectClass" ).add( "javaClass" );
        attributes.put( "fullyQualifiedJavaClassName", "HelloWorld" );
        attributes.put( "javaClassByteCode", HELLOWORLD_CLASS_BYTES );
        defaultContext.createSubcontext( "fullyQualifiedJavaClassName=HelloWorld", attributes );

        // assert set up successfull
        assertNotNull( defaultContext.lookup( "fullyQualifiedJavaClassName=HelloWorld" ) );

        // load the class
View Full Code Here

Examples of org.apache.naming.NamingContext.createSubcontext()

        // Setting the context in read/write mode
        ContextAccessController.setWritable(getNamingContextName(), this);

        // Creating the comp subcontext
        javax.naming.Context compCtx = namingContext.createSubcontext("comp");
        javax.naming.Context envCtx = compCtx.createSubcontext("env");

        // Now parsing the entries defined in the env, and adding them to the
        // naming context
View Full Code Here

Examples of org.apache.openejb.core.ivm.naming.IvmContext.createSubcontext()

    }

    private IvmContext createIvmContext() {
        IvmContext context = new IvmContext(new NameNode(null, new ParsedName("comp"), null, null));
        try {
            context.createSubcontext("comp").createSubcontext("env");
            // todo remove this... IvmContext seems to drop empty nodes
            context.bind("java:comp/env/dummy", "dummy");
        } catch (NamingException e) {
            throw new IllegalStateException("Unable to create subcontext 'java:comp/env'.  Exception:"+e.getMessage(),e);
        }
View Full Code Here

Examples of org.codehaus.spice.jndikit.memory.MemoryContext.createSubcontext()

            new DefaultNamespace(new DefaultNameParser());
        MemoryContext me = new MemoryContext(namespace, new Hashtable(), null);
       
        try
        {
            Context testContext = me.createSubcontext("test");
            testContext.bind("key", "jndivalue");
            testContext.bind("key2","jndivalue2");
            testContext.bind("short","1");
            testContext.bind("boolean","true");
            testContext.bind("byte","10");
View Full Code Here

Examples of org.eclipse.jetty.jndi.NamingContext.createSubcontext()

            nn = ncontext.toCanonicalName(ncontext.getNameParser("").parse(""));
            LOG.debug(nn.toString());
            assertEquals (0, nn.size());

            Context fee = ncontext.createSubcontext("fee");
            fee.bind ("fi", "88");
            assertEquals("88", initCtx.lookup("java:/fee/fi"));
            assertEquals("88", initCtx.lookup("java:/fee/fi/"));
            assertTrue (initCtx.lookup("java:/fee/") instanceof javax.naming.Context);
        }
View Full Code Here

Examples of org.jboss.fresh.registry.RegistryContext.createSubcontext()

    while (n.size() > 1) {
      String ctxName = n.get(0);
      try {
        ctx = (Context) ctx.lookup(ctxName);
      } catch (NameNotFoundException e) {
        ctx = ctx.createSubcontext(ctxName);
      }
      n = n.getSuffix(1);
    }

    Object bindInstance = getBindInstance();
View Full Code Here

Examples of org.jnp.interfaces.Naming.createSubcontext()

      Naming namingServer = naming.getNamingInstance();
      namingServer.bind(parser.parse(NAME),
                                      new MarshalledValuePair(VALUE),
                                      VALUE.getClass().getName());
      log.info("Bound " + VALUE + " to " + namingServer + " under " + NAME);
      Context sub = namingServer.createSubcontext(parser.parse(SUBCONTEXT_NAME));
      sub.bind(parser.parse(NAME), VALUE);
      log.info("Bound " + VALUE + " to " + sub + " under " + NAME);
     
      // NOTE: we must bind the NonDeserializable directly, or else the
      // NamingContext will wrap it in a MarshalledValuePair, which will
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.