Package javax.naming

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


                    return this;
                } else {
                    String first = path.get(0);
                    Object value = bindings.get(first);
                    if (value == null) {
                        throw new NameNotFoundException(name);
                    } else if (value instanceof Context && path.size() > 1) {
                        Context subContext = (Context)value;
                        value = subContext.lookup(path.getSuffix(1));
                    }
                    return value;
View Full Code Here

            String key = "lazyEjbRefNotResolved";
            if (info.getHome() != null){
                key += ".home";
            }
            String message = messages.format(key, info.getName(), info.getEjbLink(), info.getHome(), info.getInterface());
            throw new NameNotFoundException(message);
        }

        ContainerSystem containerSystem = systemInstance.getComponent(ContainerSystem.class);

        DeploymentInfo deploymentInfo = containerSystem.getDeploymentInfo(deploymentId);

        if (deploymentInfo == null) {
            String message = messages.format("deploymentNotFound", info.getName(), deploymentId);
            throw new NameNotFoundException(message);
        }

        String jndiName = "java:openejb/Deployment/" + deploymentId + "/" + info.getInterface();

        if (useCrossClassLoaderRef && isRemote(deploymentInfo)) {
View Full Code Here

            }

            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

                if (path.size() == 0) {
                    return this;
                } else {
                    Object obj = bindings.get(path.get(0));
                    if (obj == null){
                        throw new NameNotFoundException(name);
                    } else if (obj instanceof Context && path.size() > 1){
                        Context subContext = (Context) obj;
                        obj = subContext.lookup(path.getSuffix(1));
                    }
                    return obj;
View Full Code Here

                } catch (Exception e) {
                    throw (NamingException) new NamingException("Could not dereference " + ref).initCause(e);
                }

            case ResponseCodes.JNDI_NOT_FOUND:
                throw new NameNotFoundException(name + " does not exist in the system.  Check that the app was successfully deployed.");

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

            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

                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

        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

        }

        @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

TOP

Related Classes of javax.naming.NameNotFoundException

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.