Package org.omg.CosNaming.NamingContextPackage

Examples of org.omg.CosNaming.NamingContextPackage.NotFound


                //RemoteInterface remote = a.getRemoteInterface();
                //return remote.$getObjectRef();
                return a.getObjectRef();
            } else {
                NameServiceLog.getInstance().warnObjectHasNoRemoteInterface(nameString, object.getClass().getName());
                throw new NotFound(NotFoundReason.not_object, name);
            }
        } catch (NameNotFoundException notFound) {
            // Assume warning message has already been logged.
            throw new NotFound(NotFoundReason.missing_node, name);
        } catch (NamingException ex) {
            NameServiceLog.getInstance().warnNameNotFound(nameString, ex);
            throw new NotFound(NotFoundReason.missing_node, name);
        }
    }
View Full Code Here


        NameComponent nb = n.baseNameComponent();

        if (ctx == null) {
            // the name is bound, but it is bound to a context - the client should have been using rebind_context!
            if (this.contexts.containsKey(n))
                throw new NotFound(NotFoundReason.not_object, new NameComponent[]{nb});

            // try remove an existing binding.
            org.omg.CORBA.Object ref = (org.omg.CORBA.Object) this.names.remove(n);
            if (ref != null)
                ref._release();
View Full Code Here

        NameComponent nb = n.baseNameComponent();

        if (ctx == null) {
            // the name is bound, but it is bound to an object - the client should have been using rebind().
            if (this.names.containsKey(n))
                throw new NotFound(NotFoundReason.not_context, new NameComponent[]{nb});

            // try to remove an existing context binding.
            org.omg.CORBA.Object ref = (org.omg.CORBA.Object) this.contexts.remove(n);
            if (ref != null) {
                ref._release();
View Full Code Here

        Name n = new Name(nc[0]);
        if (nc.length > 1) {
            org.omg.CORBA.Object next_context = (org.omg.CORBA.Object) this.contexts.get(n);
            if ((next_context == null) || (isDead(next_context)))
                throw new NotFound(NotFoundReason.missing_node, nc);

            NameComponent[] nc_prime = new NameComponent[nc.length - 1];
            System.arraycopy(nc, 1, nc_prime, 0, nc_prime.length);

            // try first to call the context implementation object directly.
            String contextOID = this.getObjectOID(next_context);
            JBossNamingContext jbossContext = (contextOID == null ? null : contextImpls.get(contextOID));
            if (jbossContext != null)
                return jbossContext.resolve(nc_prime);
            else
                return NamingContextExtHelper.narrow(next_context).resolve(nc_prime);
        } else {
            org.omg.CORBA.Object result = (org.omg.CORBA.Object) this.contexts.get(n);

            if (result == null)
                result = (org.omg.CORBA.Object) this.names.get(n);

            if (result == null)
                throw new NotFound(NotFoundReason.missing_node, n.components());

            if (!noPing && isDead(result))
                throw new NotFound(NotFoundReason.missing_node, n.components());

            return result;
        }
    }
View Full Code Here

                log.debugf("Unbound: " + n.toString());
            } else {
                if (log.isEnabled(Level.WARN))
                    log.warnf("Unbind failed for " + n.toString());
                throw new NotFound(NotFoundReason.not_context, n.components());
            }
        } else {
            NameComponent[] ncx = new NameComponent[]{nb};
            org.omg.CORBA.Object context = this.resolve(ctx.components());
View Full Code Here

        NameComponent nb = n.baseNameComponent();

        if (ctx == null) {
            // the name is bound, but it is bound to a context - the client should have been using rebind_context!
            if (this.contexts.containsKey(n))
                throw new NotFound(NotFoundReason.not_object, new NameComponent[]{nb});

            // try remove an existing binding.
            org.omg.CORBA.Object ref = (org.omg.CORBA.Object) this.names.remove(n);
            if (ref != null)
                ref._release();
View Full Code Here

        NameComponent nb = n.baseNameComponent();

        if (ctx == null) {
            // the name is bound, but it is bound to an object - the client should have been using rebind().
            if (this.names.containsKey(n))
                throw new NotFound(NotFoundReason.not_context, new NameComponent[]{nb});

            // try to remove an existing context binding.
            org.omg.CORBA.Object ref = (org.omg.CORBA.Object) this.contexts.remove(n);
            if (ref != null) {
                ref._release();
View Full Code Here

        Name n = new Name(nc[0]);
        if (nc.length > 1) {
            org.omg.CORBA.Object next_context = (org.omg.CORBA.Object) this.contexts.get(n);
            if ((next_context == null) || (isDead(next_context)))
                throw new NotFound(NotFoundReason.missing_node, nc);

            NameComponent[] nc_prime = new NameComponent[nc.length - 1];
            System.arraycopy(nc, 1, nc_prime, 0, nc_prime.length);

            // try first to call the context implementation object directly.
            String contextOID = this.getObjectOID(next_context);
            CorbaNamingContext jbossContext = (contextOID == null ? null : contextImpls.get(contextOID));
            if (jbossContext != null)
                return jbossContext.resolve(nc_prime);
            else
                return NamingContextExtHelper.narrow(next_context).resolve(nc_prime);
        } else {
            org.omg.CORBA.Object result = (org.omg.CORBA.Object) this.contexts.get(n);

            if (result == null)
                result = (org.omg.CORBA.Object) this.names.get(n);

            if (result == null)
                throw new NotFound(NotFoundReason.missing_node, n.components());

            if (!noPing && isDead(result))
                throw new NotFound(NotFoundReason.missing_node, n.components());

            return result;
        }
    }
View Full Code Here

                    contextImpls.remove(oid);

                JacORBLogger.ROOT_LOGGER.debugUnboundObject(n.toString());
            } else {
                JacORBLogger.ROOT_LOGGER.failedToUnbindObject(n.toString());
                throw new NotFound(NotFoundReason.not_context, n.components());
            }
        } else {
            NameComponent[] ncx = new NameComponent[]{nb};
            org.omg.CORBA.Object context = this.resolve(ctx.components());
View Full Code Here

                // for a rebind, we must have an object, and it must be a real object
                if (resolveObject(name, type) != null) {
                    // it has to resolve to a real object.  If it is a naming context,
                    // then this is the wrong binding operation.
                    if (type.value.value() == BindingType._ncontext) {
                        throw new NotFound(NotFoundReason.not_object, n);
                    }
                    // safe to unbind
                    unbindObject(name);
                }
                type.value = BindingType.nobject;
View Full Code Here

TOP

Related Classes of org.omg.CosNaming.NamingContextPackage.NotFound

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.