![]() |
The Java Developers Almanac 1.4 |
|
e475. Adding, Replacing, Removing, and Renaming a Binding in the Naming Service try {
// Add a binding.
ctx.bind("Name", new SampleObjectImpl());
// Replace a binding.
ctx.rebind("Name", new SampleObjectImpl());
// Remove a binding.
ctx.unbind("Name");
// Rename a binding.
ctx.rename("Name", "NewSample");
} catch (NamingException e) {
}
e473. Looking Up an Object from the Naming Service e474. Listing a Context 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 e480. Parsing a JNDI Compound Name © 2002 Addison-Wesley. |