public class ContextFactory extends Object implements ObjectFactory
Constructor and Description |
---|
ContextFactory() |
Modifier and Type | Method and Description |
---|---|
static ClassLoader |
associateClassLoader(ClassLoader loader) |
static Context |
associateContext(Context ctx)
Associate the given Context with the current thread.
|
static void |
disassociateClassLoader() |
static void |
disassociateContext(Context ctx) |
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.
|
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 associateContext(Context ctx)
ctx
- the context to associate to the current thread.public static void disassociateContext(Context ctx)
public static ClassLoader associateClassLoader(ClassLoader loader)
public static void disassociateClassLoader()
public static void dump(Appendable out, String indent) throws IOException
IOException
Copyright © 1995-2014 Mort Bay Consulting. All Rights Reserved.