duke@1: /* coffeys@380: * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. duke@1: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. duke@1: * duke@1: * This code is free software; you can redistribute it and/or modify it duke@1: * under the terms of the GNU General Public License version 2 only, as ohair@158: * published by the Free Software Foundation. Oracle designates this duke@1: * particular file as subject to the "Classpath" exception as provided ohair@158: * by Oracle in the LICENSE file that accompanied this code. duke@1: * duke@1: * This code is distributed in the hope that it will be useful, but WITHOUT duke@1: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or duke@1: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License duke@1: * version 2 for more details (a copy is included in the LICENSE file that duke@1: * accompanied this code). duke@1: * duke@1: * You should have received a copy of the GNU General Public License version duke@1: * 2 along with this work; if not, write to the Free Software Foundation, duke@1: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. duke@1: * ohair@158: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ohair@158: * or visit www.oracle.com if you need additional information or have any ohair@158: * questions. duke@1: */ duke@1: duke@1: package com.sun.corba.se.spi.orb; duke@1: duke@1: import java.util.Map ; duke@1: import java.util.HashMap ; duke@1: import java.util.Properties ; duke@1: import java.util.concurrent.ConcurrentHashMap; duke@1: import java.util.logging.Logger ; duke@1: duke@1: import java.security.AccessController ; duke@1: import java.security.PrivilegedAction ; duke@1: duke@1: import org.omg.CORBA.TCKind ; duke@1: duke@1: import com.sun.corba.se.pept.broker.Broker ; duke@1: import com.sun.corba.se.pept.transport.ByteBufferPool; duke@1: duke@1: import com.sun.corba.se.spi.protocol.RequestDispatcherRegistry ; duke@1: import com.sun.corba.se.spi.protocol.ClientDelegateFactory ; duke@1: import com.sun.corba.se.spi.protocol.CorbaServerRequestDispatcher ; duke@1: import com.sun.corba.se.spi.protocol.CorbaMessageMediator ; duke@1: import com.sun.corba.se.spi.protocol.PIHandler ; duke@1: import com.sun.corba.se.spi.resolver.LocalResolver ; duke@1: import com.sun.corba.se.spi.resolver.Resolver ; duke@1: import com.sun.corba.se.spi.transport.CorbaContactInfoListFactory ; duke@1: import com.sun.corba.se.spi.legacy.connection.LegacyServerSocketEndPointInfo; duke@1: import com.sun.corba.se.spi.legacy.connection.LegacyServerSocketManager; duke@1: import com.sun.corba.se.spi.monitoring.MonitoringConstants; duke@1: import com.sun.corba.se.spi.monitoring.MonitoringManager; duke@1: import com.sun.corba.se.spi.monitoring.MonitoringManagerFactory; duke@1: import com.sun.corba.se.spi.monitoring.MonitoringFactories; duke@1: duke@1: import com.sun.corba.se.spi.ior.IdentifiableFactoryFinder ; duke@1: import com.sun.corba.se.spi.ior.TaggedComponentFactoryFinder ; duke@1: import com.sun.corba.se.spi.ior.ObjectKey ; duke@1: import com.sun.corba.se.spi.ior.ObjectKeyFactory ; duke@1: import com.sun.corba.se.spi.ior.IOR ; duke@1: duke@1: import com.sun.corba.se.spi.orbutil.closure.Closure ; duke@1: duke@1: import com.sun.corba.se.spi.orb.Operation ; duke@1: import com.sun.corba.se.spi.orb.ORBData ; duke@1: import com.sun.corba.se.spi.orb.ORBVersion ; duke@1: import com.sun.corba.se.spi.orbutil.threadpool.ThreadPoolManager; duke@1: duke@1: import com.sun.corba.se.spi.oa.OAInvocationInfo ; duke@1: import com.sun.corba.se.spi.transport.CorbaTransportManager; duke@1: duke@1: import com.sun.corba.se.spi.logging.LogWrapperFactory ; duke@1: import com.sun.corba.se.spi.logging.LogWrapperBase ; duke@1: import com.sun.corba.se.spi.logging.CORBALogDomains ; duke@1: duke@1: import com.sun.corba.se.spi.copyobject.CopierManager ; duke@1: duke@1: import com.sun.corba.se.spi.presentation.rmi.PresentationManager ; duke@1: import com.sun.corba.se.spi.presentation.rmi.PresentationDefaults ; duke@1: duke@1: import com.sun.corba.se.spi.servicecontext.ServiceContextRegistry ; duke@1: duke@1: // XXX needs an SPI or else it does not belong here duke@1: import com.sun.corba.se.impl.corba.TypeCodeImpl ; duke@1: import com.sun.corba.se.impl.corba.TypeCodeFactory ; duke@1: duke@1: // XXX Should there be a SPI level constants ? duke@1: import com.sun.corba.se.impl.orbutil.ORBConstants ; duke@1: duke@1: import com.sun.corba.se.impl.oa.poa.BadServerIdHandler ; duke@1: duke@1: import com.sun.corba.se.impl.transport.ByteBufferPoolImpl; duke@1: duke@1: import com.sun.corba.se.impl.logging.ORBUtilSystemException ; duke@1: import com.sun.corba.se.impl.logging.OMGSystemException ; duke@1: duke@1: import com.sun.corba.se.impl.presentation.rmi.PresentationManagerImpl ; duke@1: duke@1: import com.sun.corba.se.impl.orbutil.ORBClassLoader ; mbankal@445: import sun.awt.AppContext; duke@1: duke@1: public abstract class ORB extends com.sun.corba.se.org.omg.CORBA.ORB duke@1: implements Broker, TypeCodeFactory duke@1: { duke@1: // As much as possible, this class should be stateless. However, duke@1: // there are a few reasons why it is not: duke@1: // duke@1: // 1. The ORB debug flags are defined here because they are accessed duke@1: // frequently, and we do not want a cast to the impl just for that. duke@1: // 2. typeCodeMap and primitiveTypeCodeConstants are here because they duke@1: // are needed in both ORBImpl and ORBSingleton. duke@1: // 3. Logging support is here so that we can avoid problems with duke@1: // incompletely initialized ORBs that need to perform logging. duke@1: duke@1: // Flag set at compile time to debug flag processing: this can't duke@1: // be one of the xxxDebugFlags because it is used to debug the mechanism duke@1: // that sets the xxxDebugFlags! duke@1: public static boolean ORBInitDebug = false; duke@1: duke@1: // Currently defined debug flags. Any additions must be called xxxDebugFlag. duke@1: // All debug flags must be public boolean types. duke@1: // These are set by passing the flag -ORBDebug x,y,z in the ORB init args. duke@1: // Note that x,y,z must not contain spaces. duke@1: public boolean transportDebugFlag = false ; duke@1: public boolean subcontractDebugFlag = false ; duke@1: public boolean poaDebugFlag = false ; duke@1: public boolean poaConcurrencyDebugFlag = false ; duke@1: public boolean poaFSMDebugFlag = false ; duke@1: public boolean orbdDebugFlag = false ; duke@1: public boolean namingDebugFlag = false ; duke@1: public boolean serviceContextDebugFlag = false ; duke@1: public boolean transientObjectManagerDebugFlag = false ; duke@1: public boolean giopVersionDebugFlag = false; duke@1: public boolean shutdownDebugFlag = false; duke@1: public boolean giopDebugFlag = false; duke@1: public boolean invocationTimingDebugFlag = false ; duke@1: duke@1: // SystemException log wrappers. Protected so that they can be used in duke@1: // subclasses. duke@1: protected static ORBUtilSystemException staticWrapper ; duke@1: protected ORBUtilSystemException wrapper ; duke@1: protected OMGSystemException omgWrapper ; duke@1: duke@1: // This map is needed for resolving recursive type code placeholders duke@1: // based on the unique repository id. duke@1: // XXX Should this be a WeakHashMap for GC? duke@1: private Map typeCodeMap ; duke@1: duke@1: private TypeCodeImpl[] primitiveTypeCodeConstants ; duke@1: duke@1: // ByteBufferPool - needed by both ORBImpl and ORBSingleton duke@1: ByteBufferPool byteBufferPool; duke@1: duke@1: // Local testing duke@1: // XXX clean this up, probably remove these duke@1: public abstract boolean isLocalHost( String hostName ) ; duke@1: public abstract boolean isLocalServerId( int subcontractId, int serverId ) ; duke@1: duke@1: // Invocation stack manipulation duke@1: public abstract OAInvocationInfo peekInvocationInfo() ; duke@1: public abstract void pushInvocationInfo( OAInvocationInfo info ) ; duke@1: public abstract OAInvocationInfo popInvocationInfo() ; duke@1: duke@1: public abstract CorbaTransportManager getCorbaTransportManager(); duke@1: public abstract LegacyServerSocketManager getLegacyServerSocketManager(); duke@1: duke@1: // wrapperMap maintains a table of LogWrapper instances used by duke@1: // different classes to log exceptions. The key is a StringPair duke@1: // representing LogDomain and ExceptionGroup. duke@1: private Map wrapperMap ; duke@1: duke@1: private static Map staticWrapperMap = new ConcurrentHashMap(); duke@1: coffeys@380: protected MonitoringManager monitoringManager; duke@1: mbankal@445: private static PresentationManager setupPresentationManager() { duke@1: staticWrapper = ORBUtilSystemException.get( duke@1: CORBALogDomains.RPC_PRESENTATION ) ; duke@1: duke@1: boolean useDynamicStub = duke@1: ((Boolean)AccessController.doPrivileged( duke@1: new PrivilegedAction() { duke@1: public java.lang.Object run() { duke@1: return Boolean.valueOf( Boolean.getBoolean ( duke@1: ORBConstants.USE_DYNAMIC_STUB_PROPERTY ) ) ; duke@1: } duke@1: } duke@1: )).booleanValue() ; duke@1: duke@1: PresentationManager.StubFactoryFactory dynamicStubFactoryFactory = duke@1: (PresentationManager.StubFactoryFactory)AccessController.doPrivileged( duke@1: new PrivilegedAction() { duke@1: public java.lang.Object run() { duke@1: PresentationManager.StubFactoryFactory sff = duke@1: PresentationDefaults.getProxyStubFactoryFactory() ; duke@1: duke@1: String className = System.getProperty( duke@1: ORBConstants.DYNAMIC_STUB_FACTORY_FACTORY_CLASS, duke@1: "com.sun.corba.se.impl.presentation.rmi.bcel.StubFactoryFactoryBCELImpl" ) ; duke@1: duke@1: try { duke@1: // First try the configured class name, if any duke@1: Class cls = ORBClassLoader.loadClass( className ) ; duke@1: sff = (PresentationManager.StubFactoryFactory)cls.newInstance() ; duke@1: } catch (Exception exc) { duke@1: // Use the default. Log the error as a warning. duke@1: staticWrapper.errorInSettingDynamicStubFactoryFactory( duke@1: exc, className ) ; duke@1: } duke@1: duke@1: return sff ; duke@1: } duke@1: } duke@1: ) ; duke@1: mbankal@445: PresentationManager pm = new PresentationManagerImpl( useDynamicStub ) ; mbankal@445: pm.setStubFactoryFactory( false, duke@1: PresentationDefaults.getStaticStubFactoryFactory() ) ; mbankal@445: pm.setStubFactoryFactory( true, dynamicStubFactoryFactory ) ; mbankal@445: return pm; duke@1: } duke@1: coffeys@380: public void destroy() { coffeys@380: wrapper = null; coffeys@380: omgWrapper = null; coffeys@380: typeCodeMap = null; coffeys@380: primitiveTypeCodeConstants = null; coffeys@380: byteBufferPool = null; coffeys@380: } coffeys@380: mbankal@445: /** mbankal@445: * Returns the Presentation Manager for the current thread group, using the ThreadGroup-specific mbankal@445: * AppContext to hold it. Creates and records one if needed. duke@1: */ duke@1: public static PresentationManager getPresentationManager() duke@1: { mbankal@445: AppContext ac = AppContext.getAppContext(); mbankal@445: PresentationManager pm = (PresentationManager) ac.get(PresentationManager.class); mbankal@445: if (pm == null) { mbankal@445: pm = setupPresentationManager(); mbankal@445: ac.put(PresentationManager.class, pm); mbankal@445: } mbankal@445: return pm; duke@1: } duke@1: duke@1: /** Get the appropriate StubFactoryFactory. This duke@1: * will be dynamic or static depending on whether duke@1: * com.sun.CORBA.ORBUseDynamicStub is true or false. duke@1: */ duke@1: public static PresentationManager.StubFactoryFactory duke@1: getStubFactoryFactory() duke@1: { mbankal@445: PresentationManager gPM = getPresentationManager(); mbankal@445: boolean useDynamicStubs = gPM.useDynamicStubs() ; mbankal@445: return gPM.getStubFactoryFactory( useDynamicStubs ) ; duke@1: } duke@1: duke@1: protected ORB() duke@1: { duke@1: // Initialize logging first, since it is needed nearly duke@1: // everywhere (for example, in TypeCodeImpl). duke@1: wrapperMap = new ConcurrentHashMap(); duke@1: wrapper = ORBUtilSystemException.get( this, duke@1: CORBALogDomains.RPC_PRESENTATION ) ; duke@1: omgWrapper = OMGSystemException.get( this, duke@1: CORBALogDomains.RPC_PRESENTATION ) ; duke@1: duke@1: typeCodeMap = new HashMap(); duke@1: duke@1: primitiveTypeCodeConstants = new TypeCodeImpl[] { duke@1: new TypeCodeImpl(this, TCKind._tk_null), duke@1: new TypeCodeImpl(this, TCKind._tk_void), duke@1: new TypeCodeImpl(this, TCKind._tk_short), duke@1: new TypeCodeImpl(this, TCKind._tk_long), duke@1: new TypeCodeImpl(this, TCKind._tk_ushort), duke@1: new TypeCodeImpl(this, TCKind._tk_ulong), duke@1: new TypeCodeImpl(this, TCKind._tk_float), duke@1: new TypeCodeImpl(this, TCKind._tk_double), duke@1: new TypeCodeImpl(this, TCKind._tk_boolean), duke@1: new TypeCodeImpl(this, TCKind._tk_char), duke@1: new TypeCodeImpl(this, TCKind._tk_octet), duke@1: new TypeCodeImpl(this, TCKind._tk_any), duke@1: new TypeCodeImpl(this, TCKind._tk_TypeCode), duke@1: new TypeCodeImpl(this, TCKind._tk_Principal), duke@1: new TypeCodeImpl(this, TCKind._tk_objref), duke@1: null, // tk_struct duke@1: null, // tk_union duke@1: null, // tk_enum duke@1: new TypeCodeImpl(this, TCKind._tk_string), duke@1: null, // tk_sequence duke@1: null, // tk_array duke@1: null, // tk_alias duke@1: null, // tk_except duke@1: new TypeCodeImpl(this, TCKind._tk_longlong), duke@1: new TypeCodeImpl(this, TCKind._tk_ulonglong), duke@1: new TypeCodeImpl(this, TCKind._tk_longdouble), duke@1: new TypeCodeImpl(this, TCKind._tk_wchar), duke@1: new TypeCodeImpl(this, TCKind._tk_wstring), duke@1: new TypeCodeImpl(this, TCKind._tk_fixed), duke@1: new TypeCodeImpl(this, TCKind._tk_value), duke@1: new TypeCodeImpl(this, TCKind._tk_value_box), duke@1: new TypeCodeImpl(this, TCKind._tk_native), duke@1: new TypeCodeImpl(this, TCKind._tk_abstract_interface) duke@1: } ; duke@1: duke@1: monitoringManager = duke@1: MonitoringFactories.getMonitoringManagerFactory( ). duke@1: createMonitoringManager( duke@1: MonitoringConstants.DEFAULT_MONITORING_ROOT, duke@1: MonitoringConstants.DEFAULT_MONITORING_ROOT_DESCRIPTION); duke@1: } duke@1: duke@1: // Typecode support: needed in both ORBImpl and ORBSingleton duke@1: public TypeCodeImpl get_primitive_tc(int kind) duke@1: { coffeys@380: synchronized (this) { coffeys@380: checkShutdownState(); coffeys@380: } duke@1: try { duke@1: return primitiveTypeCodeConstants[kind] ; duke@1: } catch (Throwable t) { duke@1: throw wrapper.invalidTypecodeKind( t, new Integer(kind) ) ; duke@1: } duke@1: } duke@1: duke@1: public synchronized void setTypeCode(String id, TypeCodeImpl code) duke@1: { coffeys@380: checkShutdownState(); duke@1: typeCodeMap.put(id, code); duke@1: } duke@1: duke@1: public synchronized TypeCodeImpl getTypeCode(String id) duke@1: { coffeys@380: checkShutdownState(); duke@1: return (TypeCodeImpl)typeCodeMap.get(id); duke@1: } duke@1: duke@1: public MonitoringManager getMonitoringManager( ) { coffeys@380: synchronized (this) { coffeys@380: checkShutdownState(); coffeys@380: } duke@1: return monitoringManager; duke@1: } duke@1: duke@1: // Special non-standard set_parameters method for duke@1: // creating a precisely controlled ORB instance. duke@1: // An ORB created by this call is affected only by duke@1: // those properties passes explicitly in props, not by duke@1: // the system properties and orb.properties files as duke@1: // with the standard ORB.init methods. duke@1: public abstract void set_parameters( Properties props ) ; duke@1: duke@1: // ORB versioning duke@1: public abstract ORBVersion getORBVersion() ; duke@1: public abstract void setORBVersion( ORBVersion version ) ; duke@1: duke@1: // XXX This needs a better name duke@1: public abstract IOR getFVDCodeBaseIOR() ; duke@1: duke@1: /** duke@1: * Handle a bad server id for the given object key. This should duke@1: * always through an exception: either a ForwardException to duke@1: * allow another server to handle the request, or else an error duke@1: * indication. XXX Remove after ORT for ORBD work is integrated. duke@1: */ duke@1: public abstract void handleBadServerId( ObjectKey okey ) ; duke@1: public abstract void setBadServerIdHandler( BadServerIdHandler handler ) ; duke@1: public abstract void initBadServerIdHandler() ; duke@1: duke@1: public abstract void notifyORB() ; duke@1: duke@1: public abstract PIHandler getPIHandler() ; duke@1: duke@1: public abstract void checkShutdownState(); duke@1: duke@1: // Dispatch support: in the ORB because it is needed for shutdown. duke@1: // This is used by the first level server side subcontract. duke@1: public abstract boolean isDuringDispatch() ; duke@1: public abstract void startingDispatch(); duke@1: public abstract void finishedDispatch(); duke@1: duke@1: /** Return this ORB's transient server ID. This is needed for duke@1: * initializing object adapters. duke@1: */ duke@1: public abstract int getTransientServerId(); duke@1: duke@1: public abstract ServiceContextRegistry getServiceContextRegistry() ; duke@1: duke@1: public abstract RequestDispatcherRegistry getRequestDispatcherRegistry(); duke@1: duke@1: public abstract ORBData getORBData() ; duke@1: duke@1: public abstract void setClientDelegateFactory( ClientDelegateFactory factory ) ; duke@1: duke@1: public abstract ClientDelegateFactory getClientDelegateFactory() ; duke@1: duke@1: public abstract void setCorbaContactInfoListFactory( CorbaContactInfoListFactory factory ) ; duke@1: duke@1: public abstract CorbaContactInfoListFactory getCorbaContactInfoListFactory() ; duke@1: duke@1: // XXX These next 7 methods should be moved to a ResolverManager. duke@1: duke@1: /** Set the resolver used in this ORB. This resolver will be used for list_initial_services duke@1: * and resolve_initial_references. duke@1: */ duke@1: public abstract void setResolver( Resolver resolver ) ; duke@1: duke@1: /** Get the resolver used in this ORB. This resolver will be used for list_initial_services duke@1: * and resolve_initial_references. duke@1: */ duke@1: public abstract Resolver getResolver() ; duke@1: duke@1: /** Set the LocalResolver used in this ORB. This LocalResolver is used for duke@1: * register_initial_reference only. duke@1: */ duke@1: public abstract void setLocalResolver( LocalResolver resolver ) ; duke@1: duke@1: /** Get the LocalResolver used in this ORB. This LocalResolver is used for duke@1: * register_initial_reference only. duke@1: */ duke@1: public abstract LocalResolver getLocalResolver() ; duke@1: duke@1: /** Set the operation used in string_to_object calls. The Operation must expect a duke@1: * String and return an org.omg.CORBA.Object. duke@1: */ duke@1: public abstract void setURLOperation( Operation stringToObject ) ; duke@1: duke@1: /** Get the operation used in string_to_object calls. The Operation must expect a duke@1: * String and return an org.omg.CORBA.Object. duke@1: */ duke@1: public abstract Operation getURLOperation() ; duke@1: duke@1: /** Set the ServerRequestDispatcher that should be used for handling INS requests. duke@1: */ duke@1: public abstract void setINSDelegate( CorbaServerRequestDispatcher insDelegate ) ; duke@1: duke@1: // XXX The next 5 operations should be moved to an IORManager. duke@1: duke@1: /** Factory finders for the various parts of the IOR: tagged components, tagged duke@1: * profiles, and tagged profile templates. duke@1: */ duke@1: public abstract TaggedComponentFactoryFinder getTaggedComponentFactoryFinder() ; duke@1: public abstract IdentifiableFactoryFinder getTaggedProfileFactoryFinder() ; duke@1: public abstract IdentifiableFactoryFinder getTaggedProfileTemplateFactoryFinder() ; duke@1: duke@1: public abstract ObjectKeyFactory getObjectKeyFactory() ; duke@1: public abstract void setObjectKeyFactory( ObjectKeyFactory factory ) ; duke@1: duke@1: // Logging SPI duke@1: duke@1: /** duke@1: * Returns the logger based on the category. duke@1: */ duke@1: public Logger getLogger( String domain ) duke@1: { coffeys@380: synchronized (this) { coffeys@380: checkShutdownState(); coffeys@380: } duke@1: ORBData odata = getORBData() ; duke@1: duke@1: // Determine the correct ORBId. There are 3 cases: duke@1: // 1. odata is null, which happens if we are getting a logger before duke@1: // ORB initialization is complete. In this case we cannot determine duke@1: // the ORB ID (it's not known yet), so we set the ORBId to duke@1: // _INITIALIZING_. duke@1: // 2. odata is not null, so initialization is complete, but ORBId is set to duke@1: // the default "". To avoid a ".." in duke@1: // the log domain, we simply use _DEFAULT_ in this case. duke@1: // 3. odata is not null, ORBId is not "": just use the ORBId. duke@1: String ORBId ; duke@1: if (odata == null) duke@1: ORBId = "_INITIALIZING_" ; duke@1: else { duke@1: ORBId = odata.getORBId() ; duke@1: if (ORBId.equals("")) duke@1: ORBId = "_DEFAULT_" ; duke@1: } duke@1: duke@1: return getCORBALogger( ORBId, domain ) ; duke@1: } duke@1: duke@1: public static Logger staticGetLogger( String domain ) duke@1: { duke@1: return getCORBALogger( "_CORBA_", domain ) ; duke@1: } duke@1: duke@1: private static Logger getCORBALogger( String ORBId, String domain ) duke@1: { duke@1: String fqLogDomain = CORBALogDomains.TOP_LEVEL_DOMAIN + "." + duke@1: ORBId + "." + domain; duke@1: duke@1: return Logger.getLogger( fqLogDomain, ORBConstants.LOG_RESOURCE_FILE ); duke@1: } duke@1: duke@1: /** get the log wrapper class (its type is dependent on the exceptionGroup) for the duke@1: * given log domain and exception group in this ORB instance. duke@1: */ duke@1: public LogWrapperBase getLogWrapper( String logDomain, duke@1: String exceptionGroup, LogWrapperFactory factory ) duke@1: { duke@1: StringPair key = new StringPair( logDomain, exceptionGroup ) ; duke@1: duke@1: LogWrapperBase logWrapper = (LogWrapperBase)wrapperMap.get( key ); duke@1: if (logWrapper == null) { duke@1: logWrapper = factory.create( getLogger( logDomain ) ); duke@1: wrapperMap.put( key, logWrapper ); duke@1: } duke@1: duke@1: return logWrapper; duke@1: } duke@1: duke@1: /** get the log wrapper class (its type is dependent on the exceptionGroup) for the duke@1: * given log domain and exception group in this ORB instance. duke@1: */ duke@1: public static LogWrapperBase staticGetLogWrapper( String logDomain, duke@1: String exceptionGroup, LogWrapperFactory factory ) duke@1: { duke@1: StringPair key = new StringPair( logDomain, exceptionGroup ) ; duke@1: duke@1: LogWrapperBase logWrapper = (LogWrapperBase)staticWrapperMap.get( key ); duke@1: if (logWrapper == null) { duke@1: logWrapper = factory.create( staticGetLogger( logDomain ) ); duke@1: staticWrapperMap.put( key, logWrapper ); duke@1: } duke@1: duke@1: return logWrapper; duke@1: } duke@1: duke@1: // get a reference to a ByteBufferPool, a pool of NIO ByteBuffers duke@1: // NOTE: ByteBuffer pool must be unique per ORB, not per process. duke@1: // There can be more than one ORB per process. duke@1: // This method must also be inherited by both ORB and ORBSingleton. duke@1: public ByteBufferPool getByteBufferPool() duke@1: { coffeys@380: synchronized (this) { coffeys@380: checkShutdownState(); coffeys@380: } duke@1: if (byteBufferPool == null) duke@1: byteBufferPool = new ByteBufferPoolImpl(this); duke@1: duke@1: return byteBufferPool; duke@1: } duke@1: duke@1: public abstract void setThreadPoolManager(ThreadPoolManager mgr); duke@1: duke@1: public abstract ThreadPoolManager getThreadPoolManager(); duke@1: duke@1: public abstract CopierManager getCopierManager() ; duke@1: } duke@1: duke@1: // End of file.