public class ContextFactory extends Object implements ObjectFactory
Constructor and Description |
---|
ContextFactory() |
Modifier and Type | Method and Description |
---|---|
static void |
dump(Appendable out,
String indent) |
Context |
getContextForClassLoader(ClassLoader loader)
Find the naming Context for the given classloader
|
Object |
getObjectInstance(Object obj,
Name name,
Context nameCtx,
Hashtable env)
Find or create a context which pertains to a classloader.
|
NamingContext |
newNamingContext(Object obj,
ClassLoader loader,
Hashtable env,
Name name,
Context parentCtx)
Create a new NamingContext.
|
static void |
resetComponentContext(Context ctx)
Set back the context with the given value.
|
static Context |
setComponentContext(Context ctx)
Associate the given Context with the current thread.
|
public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable env) throws Exception
getObjectInstance
in interface ObjectFactory
Exception
ObjectFactory.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)
public NamingContext newNamingContext(Object obj, ClassLoader loader, Hashtable env, Name name, Context parentCtx) throws Exception
obj
- loader
- env
- name
- parentCtx
- Exception
public Context getContextForClassLoader(ClassLoader loader)
loader
- public static Context setComponentContext(Context ctx)
ctx
- the context to associate to the current thread.public static void resetComponentContext(Context ctx)
ctx
- the context to associate to the current thread.public static void dump(Appendable out, String indent) throws IOException
IOException
Copyright © 1995-2015 Mort Bay Consulting. All Rights Reserved.