![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e480. Parsing a JNDI Compound NameThis example parses a compound name using a parser from an LDAP service in which components are arranged from right to left, delimited by the comma character (,).try { NameParser parser = ctx.getNameParser(""); Name dn = parser.parse("cn=John, ou=People, o=JNDITutorial"); dn.remove(1); // ou=People dn.add(0, "c=us"); // cn=John,o=JNDITutorial,c=us dn.add("cn=fs"); // cn=fs,cn=John,o=JNDITutorial,c=us } catch (NamingException e) { }
e473. Looking Up an Object from the Naming Service e474. Listing a Context in the Naming Service e475. Adding, Replacing, Removing, and Renaming a Binding in the Naming Service e476. Creating and Destroying a Subcontext in the Naming Service e477. Getting an Object's Fully Qualified Name e478. Using a URL as a Name to the Initial Context e479. Parsing a JNDI Composite Name © 2002 Addison-Wesley. |