Examples of NameNotFoundException


Examples of javax.naming.NameNotFoundException

                    return ((Context) ctx).listBindings(new CompositeName(""));
                } finally {
                    ((Context) ctx).close();
                }
            else if (ctx == null)
                throw new NameNotFoundException(ContainerJNDIManager.JNDI_RESOURCES.getString(
                        "WinstoneContext.NameNotFound", searchName.toString()));
            else
                throw new NotContextException(ContainerJNDIManager.JNDI_RESOURCES.getString(
                        "WinstoneContext.NotContext",
                        new String[] { searchName.toString(),
View Full Code Here

Examples of javax.naming.NameNotFoundException

            if (!(ctx instanceof Context))
                throw new NotContextException(ContainerJNDIManager.JNDI_RESOURCES.getString(
                        "WinstoneContext.NotContext", new String[] {
                                bindName.get(0), ctx.getClass().getName() }));
            else if (ctx == null)
                throw new NameNotFoundException(ContainerJNDIManager.JNDI_RESOURCES.getString(
                        "WinstoneContext.NameNotFound", bindName.get(0)));
            else
                try {
                    if (allowOverwrites)
                        ((Context) ctx).rebind(bindName.getSuffix(1), value);
View Full Code Here

Examples of javax.naming.NameNotFoundException

            if (!(ctx instanceof Context))
                throw new NotContextException(ContainerJNDIManager.JNDI_RESOURCES.getString(
                        "WinstoneContext.NotContext", new String[] {
                                unbindName.get(0), ctx.getClass().getName() }));
            else if (ctx == null)
                throw new NameNotFoundException(ContainerJNDIManager.JNDI_RESOURCES.getString(
                        "WinstoneContext.NameNotFound", unbindName.get(0)));
            else
                try {
                    ((Context) ctx).unbind(unbindName.getSuffix(1));
                } finally {
View Full Code Here

Examples of javax.naming.NameNotFoundException

            if (!(ctx instanceof Context))
                throw new NotContextException(ContainerJNDIManager.JNDI_RESOURCES.getString(
                        "WinstoneContext.NotContext", new String[] {
                                childName.get(0), ctx.getClass().getName() }));
            else if (ctx == null)
                throw new NameNotFoundException(ContainerJNDIManager.JNDI_RESOURCES.getString(
                        "WinstoneContext.NameNotFound", childName.get(0)));
            else
                try {
                    ((Context) ctx).createSubcontext(childName.getSuffix(1));
                } finally {
View Full Code Here

Examples of javax.naming.NameNotFoundException

            if (!(ctx instanceof Context))
                throw new NotContextException(ContainerJNDIManager.JNDI_RESOURCES.getString(
                        "WinstoneContext.NotContext", new String[] {
                                childName.get(0), ctx.getClass().getName() }));
            else if (ctx == null)
                throw new NameNotFoundException(ContainerJNDIManager.JNDI_RESOURCES.getString(
                        "WinstoneContext.NameNotFound", childName.get(0)));
            else
                try {
                    ((Context) ctx).destroySubcontext(childName.getSuffix(1));
                } finally {
View Full Code Here

Examples of javax.naming.NameNotFoundException

    private String getRelativeName(final String name) throws NamingException {
        String newName = name;
        // We suppose that all names must be prefixed as this
        if (!name.startsWith(JAVA_PREFIX)) {
            logger.error("relative name! {0}" + name);
            throw new NameNotFoundException("Invalid name:" + name);
        }
        if (name.endsWith("/")) {
            newName = name.substring(JAVA_PREFIX.length() + 1);
        } else {
            newName = name.substring(JAVA_PREFIX.length());
View Full Code Here

Examples of javax.naming.NameNotFoundException

     */
    private Name getRelativeName(final Name name) throws NamingException {
        if (name.get(0).equals(JAVA_PREFIX)) {
            return (name.getSuffix(1));
        }
        throw new NameNotFoundException("Invalid name:" + name);
    }
View Full Code Here

Examples of javax.naming.NameNotFoundException

        }
        // leaf in the env tree
        Object ret = this.bindings.get(name);
        if (ret == null) {
            logger.debug(" {0} not found.", name);
            throw new NameNotFoundException(name);
        }
        if (ret instanceof LinkRef) {
            // Handle special case of the LinkRef since I think
            // it's not handled by std NamingManager.getObjectInstance().
            // The name hidden in linkref is in the initial context.
View Full Code Here

Examples of javax.naming.NameNotFoundException

        if (n.size() == 1) {
            // leaf in the env tree
            if (this.bindings.get(name) == null) {
                logger.error("CompNamingContext nothing to unbind");
                throw new NameNotFoundException(name);
            }
            this.bindings.remove(name);
        } else {
            // sub context in the env tree
            String suffix = n.getSuffix(1).toString();
View Full Code Here

Examples of javax.naming.NameNotFoundException

     * @see javax.naming.NameAlreadyBoundException
     */
    private Context lookupCtx(final String name) throws NamingException {
        Object obj = this.bindings.get(name);
        if (obj == null) {
            throw new NameNotFoundException();
        }
        if (obj instanceof ContextImpl) {
            return (Context) obj;
        }
        throw new NameAlreadyBoundException(name);
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.