com.sun.enterprise.naming
Class GlassFishNamingBuilder
java.lang.Object
com.sun.enterprise.naming.GlassFishNamingBuilder
- All Implemented Interfaces:
- javax.naming.spi.InitialContextFactoryBuilder, Startup, org.jvnet.hk2.component.PostConstruct, org.jvnet.hk2.component.PreDestroy
@Service
public class GlassFishNamingBuilder
- extends java.lang.Object
- implements javax.naming.spi.InitialContextFactoryBuilder, Startup, org.jvnet.hk2.component.PostConstruct, org.jvnet.hk2.component.PreDestroy
This is both a Startup service as well as our implementation of
InitialContextFactoryBuilder. When GlassFish starts up, this
startup service configures NamingManager with appropriate builder by calling
NamingManager.setInitialContextFactoryBuilder(javax.naming.spi.InitialContextFactoryBuilder).
Once the builder is setup, when ever new InitialContext() is called,
builder can either instantiate SerialInitContextFactory, which is our
implementation of InitialContextFactory, or any user specified
InitialContextFactory class. While loading user specified class, it first
uses Thread's context class loader and then CommonClassLoader.
- Author:
- Sanjeeb.Sahoo@Sun.COM
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GlassFishNamingBuilder
public GlassFishNamingBuilder()
createInitialContextFactory
public javax.naming.spi.InitialContextFactory createInitialContextFactory(java.util.Hashtable<?,?> environment)
throws javax.naming.NamingException
- Specified by:
createInitialContextFactory in interface javax.naming.spi.InitialContextFactoryBuilder
- Throws:
javax.naming.NamingException
getLifecycle
public Startup.Lifecycle getLifecycle()
- Specified by:
getLifecycle in interface Startup
postConstruct
public void postConstruct()
- Specified by:
postConstruct in interface org.jvnet.hk2.component.PostConstruct
preDestroy
public void preDestroy()
- Specified by:
preDestroy in interface org.jvnet.hk2.component.PreDestroy
Copyright © 2012 GlassFish Community. All Rights Reserved.