org.apache.avalon.excalibur.naming.memory
クラス MemoryInitialContextFactory
java.lang.Object
|
+--org.apache.avalon.excalibur.naming.memory.MemoryInitialContextFactory
- すべての実装インタフェース:
- javax.naming.spi.InitialContextFactory
- public class MemoryInitialContextFactory
- extends java.lang.Object
- implements javax.naming.spi.InitialContextFactory
Initial context factory for memorycontext.
WARNING: This class should never be use used in a real
system. It is is just a class that demonstrates how to write a
basic InitialContextFactory
for MemeoryContext.
However this factory creates a new Context every time which is
rarely desired behaviour.
In a real application you may want the policy of Context
creation to be specific application. Some strategies include.
- ClassLoader-wide. ie Every user who is in same ClassLoader
or loaded from a Child ClassLoader will see same JNDI tree.
In this case the InitialContextFactory should cache root
context in a static variable.
- Thread-specific. ie Give out initial context based on which
thread the caller is in. In this case the InitialContextFactory
should cache root context in a [Inheritable]ThreadLocal
variable.
- Parameter-specific. ie Give out initial context based on
a parameter passed in. The parameter could be passed in as
PROVIDER_URL or another standard context property. In this
case the InitialContextFactory should cache root context(s)
in a static map variable that maps between parameter and
context.
- バージョン:
- $Revision: 1.4 $
- 作成者:
- Peter Donald
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MemoryInitialContextFactory
public MemoryInitialContextFactory()
getInitialContext
public javax.naming.Context getInitialContext(java.util.Hashtable environment)
throws javax.naming.NamingException
- 定義:
- インタフェース
javax.naming.spi.InitialContextFactory
内の getInitialContext
"Copyright ? 2001 Apache Jakarta Project. All Rights Reserved."