Package com.sun.enterprise.naming
Class GlassFishNamingBuilder
- java.lang.Object
-
- com.sun.enterprise.naming.GlassFishNamingBuilder
-
- All Implemented Interfaces:
InitialContextFactoryBuilder,org.glassfish.hk2.api.PostConstruct,org.glassfish.hk2.api.PreDestroy
@Service @RunLevel(value=1, mode=0) public class GlassFishNamingBuilder extends Object implements InitialContextFactoryBuilder, org.glassfish.hk2.api.PostConstruct, org.glassfish.hk2.api.PreDestroyThis is both a init run level service as well as our implementation ofInitialContextFactoryBuilder. When GlassFish starts up, this startup service configures NamingManager with appropriate builder by callingNamingManager.setInitialContextFactoryBuilder(javax.naming.spi.InitialContextFactoryBuilder). Once the builder is setup, when ever new InitialContext() is called, builder can either instantiateSerialInitContextFactory, which is our implementation ofInitialContextFactory, or any user specified InitialContextFactory class. While loading user specified class, it first uses Thread's context class loader and then CommonClassLoader. Please note that this is setup as an init level service to ensure that JNDI subsystem is setup before applications are loaded.- Author:
- Sanjeeb.Sahoo@Sun.COM
-
-
Field Summary
Fields Modifier and Type Field Description static StringFAILED_TO_LOAD_CLASS
-
Constructor Summary
Constructors Constructor Description GlassFishNamingBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InitialContextFactorycreateInitialContextFactory(Hashtable<?,?> environment)voidpostConstruct()voidpreDestroy()
-
-
-
Field Detail
-
FAILED_TO_LOAD_CLASS
public static final String FAILED_TO_LOAD_CLASS
- See Also:
- Constant Field Values
-
-
Method Detail
-
createInitialContextFactory
public InitialContextFactory createInitialContextFactory(Hashtable<?,?> environment) throws NamingException
- Specified by:
createInitialContextFactoryin interfaceInitialContextFactoryBuilder- Throws:
NamingException
-
postConstruct
public void postConstruct()
- Specified by:
postConstructin interfaceorg.glassfish.hk2.api.PostConstruct
-
preDestroy
public void preDestroy()
- Specified by:
preDestroyin interfaceorg.glassfish.hk2.api.PreDestroy
-
-