FileDocCategorySizeDatePackage
ProviderManager.javaAPI DocGlassfish v2 API3718Fri May 04 22:35:08 BST 2007com.sun.enterprise.naming

ProviderManager

public class ProviderManager extends Object
This class is a facade for the remote and local SerialContextProvider The need for this class arose from the fact that we wanted to have a way of lazily initializing the Remote SerialContextProvider. The TransientContext member field has to be shared across both remote and local SerialContextProvider. It could have been a static variable but to avoid issues of static variables with multiple threads, etc, this class has been designed. The ORB needs to be initialized before the call to initRemoteProvider()
author
Sheetal Vartak

Fields Summary
private static ProviderManager
providerManager
private TransientContext
rootContext
private SerialContextProvider
localProvider
private boolean
initRemoteProviderDone
static Logger
_logger
Constructors Summary
Methods Summary
public synchronized SerialContextProvidergetLocalProvider()

 	  
	if (localProvider == null) {
	    localProvider = LocalSerialContextProviderImpl.getProvider(rootContext);
	}
	return localProvider;
    
public static synchronized com.sun.enterprise.naming.ProviderManagergetProviderManager()

  
         
	if (providerManager  == null ) {
	    providerManager = new ProviderManager();	 
        }
	return providerManager;
    
public TransientContextgetTransientContext()

	return rootContext;
    
public synchronized voidinitRemoteProvider()

	if (initRemoteProviderDone == false) {	 
 	 
	    RemoteSerialContextProviderImpl.initSerialContextProvider(rootContext);
	    initRemoteProviderDone = true;
	}