jrun.naming
Class ENCFactory
java.lang.Object
|
+--jrun.naming.ENCFactory
- All Implemented Interfaces:
- javax.naming.spi.ObjectFactory
- public final class ENCFactory
- extends java.lang.Object
- implements javax.naming.spi.ObjectFactory
The java:comp/env Context, aka the Environmental
Naming Context (ENC) is special to J2EE.
It is a component-specific namespace not visible to other components
(even in the same application). This ENCFactory, which conforms to
the JNDI ObjectFactory logic, supplies this unique functionality.
Each component, such as an EJB, owns its own unique ClassLoader.
By getting the current requesting Thread's ClassLoader as a key,
the factory knows whether a ContextManager exists for the requestor
or whether a new one needs to be created. It uses this Thread and
ClassLoader association to ensure that each component has a unique
ContextManager for the java:comp/env namespace.
Application components should create and initialize their ENC
with component-specific values (such as resource refs and the like)
at deployment time.
- Author:
- PS Neville
|
Method Summary |
java.lang.Object |
getObjectInstance(java.lang.Object obj,
javax.naming.Name name,
javax.naming.Context nameCtx,
java.util.Hashtable env)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ENCFactory
public ENCFactory()
getObjectInstance
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
- Specified by:
getObjectInstance in interface javax.naming.spi.ObjectFactory
Copyright � 2002 Macromedia Corporation. All Rights Reserved.