public abstract void bind (Name name, Object obj, Attributes attrs) throws NamingException

Binds a name to an object, along with associated attributes. If attrs is null, the resulting binding will have the attributes associated with obj if obj is a DirContext, and no attributes otherwise. If attrs is non-null, the resulting binding will have attrs as its attributes; any attributes associated with obj are ignored.

Parameters:
name     the name to bind; may not be empty
obj     the object to bind; possibly null
attrs     the attributes to associate with the binding

Exceptions:
NameAlreadyBoundException    if name is already bound
InvalidAttributesException    if some "mandatory" attributes of the binding are not supplied
NamingException    if a naming exception is encountered

See also:
Context.bind(Name, Object), rebind(Name, Object, Attributes)