com.sun.enterprise.naming
Class GlassFishNamingBuilder

java.lang.Object
  extended by com.sun.enterprise.naming.GlassFishNamingBuilder
All Implemented Interfaces:
InitialContextFactoryBuilder, Startup, org.jvnet.hk2.component.PostConstruct, org.jvnet.hk2.component.PreDestroy

@Service
public class GlassFishNamingBuilder
extends Object
implements 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

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.glassfish.api.Startup
Startup.Lifecycle
 
Constructor Summary
GlassFishNamingBuilder()
           
 
Method Summary
 InitialContextFactory createInitialContextFactory(Hashtable<?,?> environment)
           
 Startup.Lifecycle getLifecycle()
           
 void postConstruct()
           
 void preDestroy()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlassFishNamingBuilder

public GlassFishNamingBuilder()
Method Detail

createInitialContextFactory

public InitialContextFactory createInitialContextFactory(Hashtable<?,?> environment)
                                                  throws NamingException
Specified by:
createInitialContextFactory in interface InitialContextFactoryBuilder
Throws:
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.