Package javax.naming

Examples of javax.naming.NotContextException


            if (ctx instanceof Context)
            {
                ((Context)ctx).bind (cname.getSuffix(1), obj);
            }
            else
                throw new NotContextException ("Object bound at "+firstComponent +" is not a Context");
        }
    }
View Full Code Here


        if (ctx instanceof Context)
        {
            return ((Context)ctx).createSubcontext (cname.getSuffix(1));
        }
        else
            throw new NotContextException (firstComponent +" is not a Context");
    }
View Full Code Here

                    throw new NamingException (e.getMessage());
                }
            }
        }
        if (!(ctx instanceof Context))
            throw new NotContextException();

        return ((Context)ctx).lookup (cname.getSuffix(1));
    }
View Full Code Here

        if (o == this) {
            return new ListEnumeration();
        } else if (o instanceof Context) {
            return ((Context) o).list("");
        } else {
            throw new NotContextException();
        }
    }
View Full Code Here

        if (o == this) {
            return new ListBindingEnumeration();
        } else if (o instanceof Context) {
            return ((Context) o).listBindings("");
        } else {
            throw new NotContextException();
        }
    }
View Full Code Here

     *
     * @param name the name
     * @return the exception
     */
    public static NotContextException notAContextException(Name name) {
        return new NotContextException(name.toString());
    }
View Full Code Here

     *
     * @param name the name
     * @return the exception
     */
    public static NotContextException notAContextException(Name name) {
        return new NotContextException(name.toString());
    }
View Full Code Here

        } else {
            if (entry.type == NamingEntry.CONTEXT) {
                ((Context) entry.value).close();
                bindings.remove(name.get(0));
            } else {
                throw new NotContextException
                    (sm.getString("namingContext.contextExpected"));
            }
        }
       
    }
View Full Code Here

        if (name.size() > 1) {
            Object obj = bindings.get(name.get(0));
            if (obj instanceof Context) {
                return ((Context) obj).getNameParser(name.getSuffix(1));
            } else {
                throw new NotContextException
                    (sm.getString("namingContext.contextExpected"));
            }
        }

        return nameParser;
View Full Code Here

         Object removed = this.m_cache.remove(ctx, key);
         if (removed == null)
         {
            if (!this.m_cache.getRoot().hasChild(ctx))
            {
                throw new NotContextException(name.getPrefix(size - 1).toString() + " not a context");
            }

            throw new NameNotFoundException(key + " not bound");
         }
      }
View Full Code Here

TOP

Related Classes of javax.naming.NotContextException

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.