iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/naming/CorbaNamingContext.java
public void bind(NameComponent[] nc, org.omg.CORBA.Object obj) throws NotFound, CannotProceed, InvalidName,
            AlreadyBound {
        if (this.destroyed)
            throw new CannotProceed();

        if (nc == null || nc.length == 0)
            throw new InvalidName();

        if (obj == null)
            throw new org.omg.CORBA.BAD_PARAM();

        Name n = new Name(nc);
        Name ctx = n.ctxName();
        NameComponent nb = n.baseNameComponent();

        if (ctx == null) {
            if (this.names.containsKey(n)) {
                // if the name is still in use, try to ping the object
                org.omg.CORBA.Object ref = (org.omg.CORBA.Object) this.names.get(n);
                if (isDead(ref)) {
                    rebind(n.components(), obj);
                    return;
                }
                throw new AlreadyBound();
            } else if (this.contexts.containsKey(n)) {
                // if the name is still in use, try to ping the object
                org.omg.CORBA.Object ref = (org.omg.CORBA.Object) this.contexts.get(n);
                if (isDead(ref))
                    unbind(n.components());
                throw new AlreadyBound();
            }

            if ((this.names.put(n, obj)) != null)
                throw new CannotProceed(_this(), n.components());

            IIOPLogger.ROOT_LOGGER.debugf("Bound name: %s", n);
        } else {
            NameComponent[] ncx = new NameComponent[]{nb};
            org.omg.CORBA.Object context = this.resolve(ctx.components());

            // try first to call the context implementation object directly.
            String contextOID = this.getObjectOID(context);
            CorbaNamingContext jbossContext = (contextOID == null ? null : contextImpls.get(contextOID));
            if (jbossContext != null)
                jbossContext.bind(ncx, obj);
            else
                NamingContextExtHelper.narrow(context).bind(ncx, obj);
        }
    }
public void bind(NameComponent[] nc, org.omg.CORBA.Object obj) throws NotFound, CannotProceed, InvalidName,
            AlreadyBound {
        if (this.destroyed)
            throw new CannotProceed();

        if (nc == null || nc.length == 0)
            throw new InvalidName();

        if (obj == null)
            throw new org.omg.CORBA.BAD_PARAM();

        Name n = new Name(nc);
        Name ctx = n.ctxName();
        NameComponent nb = n.baseNameComponent();

        if (ctx == null) {
            if (this.names.containsKey(n)) {
                // if the name is still in use, try to ping the object
                org.omg.CORBA.Object ref = (org.omg.CORBA.Object) this.names.get(n);
                if (isDead(ref)) {
                    rebind(n.components(), obj);
                    return;
                }
                throw new AlreadyBound();
            } else if (this.contexts.containsKey(n)) {
                // if the name is still in use, try to ping the object
                org.omg.CORBA.Object ref = (org.omg.CORBA.Object) this.contexts.get(n);
                if (isDead(ref))
                    unbind(n.components());
                throw new AlreadyBound();
            }

            if ((this.names.put(n, obj)) != null)
                throw new CannotProceed(_this(), n.components());

            IIOPLogger.ROOT_LOGGER.debugf("Bound name: %s", n);
        } else {
            NameComponent[] ncx = new NameComponent[]{nb};
            org.omg.CORBA.Object context = this.resolve(ctx.components());

            // try first to call the context implementation object directly.
            String contextOID = this.getObjectOID(context);
            CorbaNamingContext jbossContext = (contextOID == null ? null : contextImpls.get(contextOID));
            if (jbossContext != null)
                jbossContext.bind(ncx, obj);
            else
                NamingContextExtHelper.narrow(context).bind(ncx, obj);
        }
    }
======================================= NamingContextOperation Methods ==================================//