|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectorg.eclipse.jetty.jndi.ContextFactory
public class ContextFactory
ContextFactory.java This is an object factory that produces a jndi naming context based on a classloader. It is used for the java:comp context. This object factory is bound at java:comp. When a lookup arrives for java:comp, this object factory is invoked and will return a context specific to the caller's environment (so producing the java:comp/env specific to a webapp). The context selected is based on classloaders. First we try looking at the thread context classloader if it is set, and walk its hierarchy, creating a context if none is found. If the thread context classloader is not set, then we use the classloader associated with the current Context. If there is no current context, or no classloader, we return null. Created: Fri Jun 27 09:26:40 2003
| 构造方法摘要 | |
|---|---|
ContextFactory()
|
|
| 方法摘要 | |
|---|---|
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. |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public ContextFactory()
| 方法详细信息 |
|---|
public Object getObjectInstance(Object obj,
Name name,
Context nameCtx,
Hashtable env)
throws Exception
ObjectFactory 中的 getObjectInstanceExceptionObjectFactory.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 -
Exceptionpublic 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
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||