Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to skip gmbal init #204

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ public void init( ORB orb )
NullaryFunction.Factory.makeConstant(
(org.omg.CORBA.Object)poaCurrent ) ) ;
this.mom = orb.mom() ;
mom.registerAtRoot( this ) ;
if (mom != null) {
mom.registerAtRoot( this ) ;
}
}

public ObjectAdapter find( ObjectAdapterId oaid )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,9 @@ static POAFactory getPOAFactory( ORB orb )

@Poa
private static void registerMBean( ORB orb, Object obj ) {
orb.mom().register( getPOAFactory( orb ), obj ) ;
if (orb.mom() != null) {
orb.mom().register( getPOAFactory( orb ), obj ) ;
}
}

// package private so that POAFactory can access it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ public void init( ORB orb )
this.orb = orb ;
tom = new TransientObjectManager( orb ) ;
codebaseToTOA = new HashMap<String,TOAImpl>() ;
orb.mom().registerAtRoot( this ) ;
if (orb.mom() != null) {
orb.mom().registerAtRoot( this ) ;
}
}

public void shutdown( boolean waitForCompletion )
Expand Down
14 changes: 10 additions & 4 deletions orbmain/src/main/java/com/sun/corba/ee/impl/orb/ORBImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@
import org.glassfish.pfl.basic.contain.ResourceFactory;
import org.glassfish.pfl.basic.func.NullaryFunction;
import org.glassfish.pfl.tf.spi.annotation.InfoMethod;


import static com.sun.corba.ee.spi.misc.ORBConstants.SKIP_GMBAL_INIT;

/**
* The JavaIDL ORB implementation.
*/
Expand Down Expand Up @@ -550,7 +552,9 @@ private void postInit( String[] params, DataCollector dataCollector ) {
setDebugFlags( configData.getORBDebugFlags() ) ;
configDataParsingComplete( getORBData().getORBId() ) ;

initManagedObjectManager() ;
if (!Boolean.parseBoolean(System.getProperty(SKIP_GMBAL_INIT, "false"))) {
initManagedObjectManager() ;
}

// The TimerManager must be
// initialized BEFORE the pihandler.initialize() call, in
Expand Down Expand Up @@ -618,8 +622,10 @@ private void postInit( String[] params, DataCollector dataCollector ) {

// Now the ORB is ready, so finish all of the MBean registration
if (configData.registerMBeans()) {
mom.resumeJMXRegistration() ;
mbeansRegistereed( getORBData().getORBId() ) ;
if (mom != null) {
mom.resumeJMXRegistration() ;
mbeansRegistereed( getORBData().getORBId() ) ;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ public TransportManagerImpl(ORB orb)
outboundConnectionCaches = new HashMap<String,OutboundConnectionCache>();
inboundConnectionCaches = new HashMap<String,InboundConnectionCache>();
selector = new SelectorImpl(orb);
orb.mom().register( orb, this ) ;
if (orb.mom() != null) {
orb.mom().register( orb, this ) ;
}
}

public ByteBufferPool getByteBufferPool(int id)
Expand All @@ -99,7 +101,9 @@ public OutboundConnectionCache getOutboundConnectionCache(

// We need to clean up the multi-cache support:
// this really only works with a single cache.
orb.mom().register( this, connectionCache ) ;
if (orb.mom() != null) {
orb.mom().register( this, connectionCache ) ;
}
StatsProviderManager.register( "orb", PluginPoint.SERVER,
"orb/transport/connectioncache/outbound", connectionCache ) ;

Expand Down Expand Up @@ -139,7 +143,9 @@ public InboundConnectionCache getInboundConnectionCache(
connectionCache =
new InboundConnectionCacheImpl(orb,
acceptor);
orb.mom().register( this, connectionCache ) ;
if (orb.mom() != null) {
orb.mom().register( this, connectionCache ) ;
}
StatsProviderManager.register( "orb", PluginPoint.SERVER,
"orb/transport/connectioncache/inbound", connectionCache ) ;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ public static int makePersistent( int scid )
public static final String SERVER_PORT_PROPERTY = SUN_PREFIX + "ORBServerPort" ;
public static final String SERVER_HOST_PROPERTY = SUN_PREFIX + "ORBServerHost" ;
public static final String ORB_ID_PROPERTY = CORBA_PREFIX + "ORBId" ;
public static final String SKIP_GMBAL_INIT = CORBA_PREFIX + "SkipGmbalInit" ;
// This property is provided for backward compatibility reasons
public static final String OLD_ORB_ID_PROPERTY = SUN_PREFIX + "ORBid" ;
public static final String ORB_SERVER_ID_PROPERTY = CORBA_PREFIX + "ORBServerId" ;
Expand Down