javaURLContextFactorypublic class javaURLContextFactory extends Object implements ObjectFactory, InitialContextFactoryContext factory for the "java:" namespace.
Important note : This factory MUST be associated with the "java" URL
prefix, which can be done by either :
- Adding a
java.naming.factory.url.pkgs=org.apache.catalina.util.naming property
to the JNDI properties file
- Setting an environment variable named Context.URL_PKG_PREFIXES with
its value including the org.apache.catalina.util.naming package name.
More detail about this can be found in the JNDI documentation :
{@link javax.naming.spi.NamingManager#getURLContext(java.lang.String, java.util.Hashtable)}.
|
Fields Summary |
---|
public static final String | MAIN | protected static Context | initialContextInitial context. |
Methods Summary |
---|
public javax.naming.Context | getInitialContext(java.util.Hashtable environment)Get a new (writable) initial context.
if (ContextBindings.isThreadBound() ||
(ContextBindings.isClassLoaderBound())) {
// Redirect the request to the bound initial context
return new SelectorContext(environment, true);
} else {
// If the thread is not bound, return a shared writable context
if (initialContext == null)
initialContext = new NamingContext(environment, MAIN);
return initialContext;
}
| public java.lang.Object | getObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable environment)Crete a new Context's instance.
// --------------------------------------------------------- Public Methods
// -------------------------------------------------- ObjectFactory Methods
if ((ContextBindings.isThreadBound()) ||
(ContextBindings.isClassLoaderBound())) {
return new SelectorContext(environment);
} else {
return null;
}
|
|