Bind

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

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.