@Override public Object lookup(String name) throws NamingException { Object toReturn = super.lookup(name); if (toReturn == null) { throw new NamingException("Name not found: " + name); } return toReturn; }
@Override public Object lookup(String name) throws NamingException { Object toReturn = super.lookup(name); if (toReturn == null) { throw new NamingException("Name not found: " + name); } return toReturn; }
@Override public Object lookup(Name name) throws NamingException { log.info("lookup [ " + name + " ]"); return super.lookup(name); }
@Override public Object lookup(String name) throws NamingException { Object toReturn = super.lookup(name); if (toReturn == null) { throw new NamingException("Name not found: " + name); } return toReturn; }
@Override public Object lookup(String name) throws NamingException { Object toReturn = super.lookup(name); if (toReturn == null) { throw new NamingException("Name not found: " + name); } return toReturn; }
/** * @see javax.naming.Context#createSubcontext(javax.naming.Name) */ public Context createSubcontext(Name name) throws NamingException { Context newContext; /* Get the subcontexts of /this/ subcontext. */ Hashtable subContexts = getSubContexts(); if(name.size() > 1) { if(subContexts.containsKey(name.getPrefix(1))) { Context subContext = (Context)subContexts.get(name.getPrefix(1)); newContext = subContext.createSubcontext(name.getSuffix(1)); return newContext; } throw new NameNotFoundException("The subcontext " + name.getPrefix(1) + " was not found."); } if(lookup(name) != null) { throw new NameAlreadyBoundException(); } Name contextName = getNameParser((Name)null).parse(getNameInNamespace()); contextName.addAll(name); newContext = new MemoryContext(this); ((AbstractContext)newContext).setNameInNamespace(contextName); bind(name, newContext); return newContext; } }