FileDocCategorySizeDatePackage
unbind.javaAPI DocExample2060Thu Dec 15 21:28:46 GMT 2005com.oreilly.jent.jndi

unbind

public class unbind extends Object implements Command
unbind: Command to remove a binding from the JNDI namespace.

Fields Summary
Constructors Summary
Methods Summary
public voidexecute(javax.naming.Context c, java.util.Vector v)

            
        // check to see if we have all the args we need to rebind
        if (v.isEmpty())
            throw new CommandException(new Exception(), "No names specified");
                
        String name = (String)v.firstElement();

        try {
            c.unbind(name);
            System.out.println("Unbound the object " + name);
        }
        catch (NamingException ne) {
            throw new CommandException (ne, "Couldn't unbind " + name);
        }
    
public voidhelp()

 System.out.println("Usage: unbind [name]");