|
Re: InitialContext.lookup() Problem
|
Posted: Nov 11, 2005 1:37 AM
|
|
The two classes I mentioned where only examples from the API.
getURLOrDefaultInitCtx actually calls the getURLObject Method in NamingManager.
Did you actually try this method to see what it does, wich class the returned Object has?
You CAN read the whole Java source code to get your answer or you just try.
If you choose the first way, these are the key lines in NamingManager.getURLObject
ObjectFactory factory = (ObjectFactory)ResourceManager.getFactory( Context.URL_PKG_PREFIXES, environment, nameCtx, "." + scheme + "." + scheme + "URLContextFactory", defaultPkgPrefix);
factory.getObjectInstance(urlInfo, name, nameCtx, environment);
|
|