public class ContextFactory
extends java.lang.Object
implements javax.naming.spi.ObjectFactory
Constructor and Description |
---|
ContextFactory() |
Modifier and Type | Method and Description |
---|---|
static void |
dump(java.lang.Appendable out,
java.lang.String indent) |
java.lang.Object |
getObjectInstance(java.lang.Object obj,
javax.naming.Name name,
javax.naming.Context nameCtx,
java.util.Hashtable env)
Find or create a context which pertains to a classloader.
|
javax.naming.Context |
getParentClassLoaderContext(java.lang.ClassLoader loader)
Keep trying ancestors of the given classloader to find one to which
the context is bound.
|
static void |
resetComponentContext(javax.naming.Context ctx)
Set back the context with the given value.
|
static javax.naming.Context |
setComponentContext(javax.naming.Context ctx)
Associate the given Context with the current thread.
|
public java.lang.Object getObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable env) throws java.lang.Exception
getObjectInstance
in interface javax.naming.spi.ObjectFactory
java.lang.Exception
ObjectFactory.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)
public javax.naming.Context getParentClassLoaderContext(java.lang.ClassLoader loader)
loader
- public static javax.naming.Context setComponentContext(javax.naming.Context ctx)
ctx
- the context to associate to the current thread.public static void resetComponentContext(javax.naming.Context ctx)
ctx
- the context to associate to the current thread.public static void dump(java.lang.Appendable out, java.lang.String indent) throws java.io.IOException
java.io.IOException
Copyright © 2013. All Rights Reserved.