Package javax.naming.directory

Examples of javax.naming.directory.InitialDirContext.createSubcontext()


    Attribute o = new BasicAttribute("o");
    o.add("test");
    attributes.put(o);

    context.createSubcontext("o=test", attributes);
    assertTrue(DirectoryServer.entryExists(DN.decode("o=test")));

    context.close();
  }
View Full Code Here


        env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
        env.put( Context.PROVIDER_URL, "ou=system" );

        DirContext ctx = new InitialDirContext( env );

        ctx.createSubcontext( rdn, attrs );

        // Add the first value for description
        String description1 = "an American singer-songwriter";
        Attribute firstDescr = new BasicAttribute( "description", description1 );
        ModificationItem modification = new ModificationItem( DirContext.ADD_ATTRIBUTE, firstDescr );
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.