Examples of NameNotFoundException


Examples of javax.naming.NameNotFoundException

            case ResponseCodes.JNDI_ENUMERATION:
                return (NamingEnumeration) res.getResult();

            case ResponseCodes.JNDI_NOT_FOUND:
                throw new NameNotFoundException(name);

            case ResponseCodes.JNDI_NAMING_EXCEPTION:
                Throwable throwable = ((ThrowableArtifact) res.getResult()).getThrowable();
                if (throwable instanceof NamingException) {
                    throw (NamingException) throwable;
View Full Code Here

Examples of javax.naming.NameNotFoundException

                Context ctx = new InitialContext();
                return ctx.lookup(fullName);
            } else if (new CompositeName(fullName).size() == 0) {
                return this;
            }
            throw new NameNotFoundException(fullName);
        }

        // we should only ever see a CachingReference
        if (result instanceof CachingReference) {
            result = ((CachingReference)result).get();
View Full Code Here

Examples of javax.naming.NameNotFoundException

        Kernel kernel = getKernel();
        try {
            AbstractName targetName = resolveTargetName();
            return kernel.getAttribute(targetName, "ORB");
        } catch (Exception e) {
            throw (NameNotFoundException) new NameNotFoundException("Error getting ORB attribute from CORBAGBean: name query =" + abstractNameQueries).initCause(e);
        }
    }
View Full Code Here

Examples of javax.naming.NameNotFoundException

        }

        @Override
        protected Name getName(Name name) throws NamingException {
            String first = name.get(0);
            if (!first.startsWith("java:")) throw new NameNotFoundException("Name must be in java: namespace");
            first = first.substring("java:".length());
            name = name.getSuffix(1);
            return name.add(0, first);
        }
View Full Code Here

Examples of javax.naming.NameNotFoundException

        }

        @Override
        protected String getName(String name) throws NamingException {
            if ("inject".equals(name)) return name;
            if (!name.startsWith("java:")) throw new NameNotFoundException("Name must be in java: namespace");
            return name.substring("java:".length());
        }
View Full Code Here

Examples of javax.naming.NameNotFoundException

        AbstractName target;
        try {
            target = resolveTargetName();
        } catch (GBeanNotFoundException e) {
            throw (NameNotFoundException) new NameNotFoundException("Could not resolve name query: " + abstractNameQueries).initCause(e);
        }

        Object proxy;
        try {
            proxy = kernel.invoke(target, "$getResource");
View Full Code Here

Examples of javax.naming.NameNotFoundException

        Kernel kernel = getKernel();
        try {
            AbstractName targetName = resolveTargetName();
            return kernel.getAttribute(targetName, "handleDelegate");
        } catch (Exception e) {
            throw (NameNotFoundException) new NameNotFoundException("Error getting handle delegate attribute from CORBAGBean: name query =" + abstractNameQueries).initCause(e);
        }
    }
View Full Code Here

Examples of javax.naming.NameNotFoundException

    public Object getContent() throws IllegalStateException, NameNotFoundException {
        AbstractName target;
        try {
            target = resolveTargetName();
        } catch (GBeanNotFoundException e) {
            throw (NameNotFoundException)new NameNotFoundException("Could not resolve gbean from name query: " + abstractNameQueries).initCause(e);
        }
        try {
            return getKernel().getGBean(target);
        } catch (GBeanNotFoundException e) {
            IllegalStateException illegalStateException = new IllegalStateException();
View Full Code Here

Examples of javax.naming.NameNotFoundException

            }

            Context compCtx = (Context) compContext.get();
            if (compCtx == null) {
                // the component context was not set for this thread
                throw new NameNotFoundException(name);
            }

            if ("comp".equals(name)) {
                return compCtx;
            } else if (name.startsWith("comp/")) {
                return compCtx.lookup(name.substring(5));
            } else if ("/comp".equals(name)) {
                return compCtx;
            } else if (name.startsWith("/comp/")) {
                return compCtx.lookup(name.substring(6));
            } else {
                throw new NameNotFoundException("Unrecognized name, does not start with expected 'comp': " + name);
            }
        }
        return super.lookup(name);
    }
View Full Code Here

Examples of javax.naming.NameNotFoundException

    }

    public Object getObject() throws NamingException {
        Object component = SystemInstance.get().getComponent(type);
        if (component == null) {
            throw new NameNotFoundException("No " + type.getSimpleName() + " registered with the OpenEJB system");
        }
        return component;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.