Tuesday, November 27, 2007

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) {
}

No comments: