1 23 package com.sun.enterprise.naming; 24 25 import java.rmi.*; 26 27 import java.util.logging.*; 28 import com.sun.logging.*; 29 30 41 42 public class ProviderManager { 43 44 private static ProviderManager providerManager; 46 private TransientContext rootContext = new TransientContext(); 47 private SerialContextProvider localProvider; 48 private boolean initRemoteProviderDone = false; 49 static Logger _logger = LogDomains.getLogger(LogDomains.JNDI_LOGGER); 50 51 public synchronized static ProviderManager getProviderManager() { 52 if (providerManager == null ) { 53 providerManager = new ProviderManager(); 54 } 55 return providerManager; 56 } 57 58 public TransientContext getTransientContext() { 59 return rootContext; 60 } 61 62 public synchronized SerialContextProvider getLocalProvider() { 63 64 if (localProvider == null) { 65 localProvider = LocalSerialContextProviderImpl.getProvider(rootContext); 66 } 67 return localProvider; 68 } 69 70 public synchronized void initRemoteProvider() throws RemoteException { 71 if (initRemoteProviderDone == false) { 72 73 RemoteSerialContextProviderImpl.initSerialContextProvider(rootContext); 74 initRemoteProviderDone = true; 75 } 76 } 77 78 79 } 80 | Popular Tags |