-
Bug
-
Resolution: Fixed
-
P3
-
1.4.0
-
None
-
beta
-
unknown
-
solaris_2.6
POAImpl.pre_initialize() has the following code:
...
// Construct the IORTemplate
POAORB poaorb = (POAORB)orb;
int serverid;
int port;
if ( policies.isTransient() ) {
serverid = poaorb.getTransientServerId();
// REVISIT this should use a multiple server port API when one exists?
port = poaorb.getServerEndpoint().getPort();
scid = ORBConstants.TransientSCID ;
} else {
serverid = poaorb.getPersistentServerId();
port = poaorb.getPersistentServerPort(EndPoint.IIOP_CLEAR_TEXT);
scid = ORBConstants.PersistentSCID ;
}
...
The calls to getServerEndpoint or getPersistentServerPort cause a
listen socket and thread to be created, regardless of whether an
object reference is created or exported.
If someone creates a POAORB (or the derived PIORB or Tx ORB) for
client use (which is expected, just to use interceptors) then a listen
socket will be opened.
We will need to change this code such that it at least waits to obtain
and install the port in the template until the first reference is
created (ideally it would wait until one was exported, but that is
probably too hard).
...
// Construct the IORTemplate
POAORB poaorb = (POAORB)orb;
int serverid;
int port;
if ( policies.isTransient() ) {
serverid = poaorb.getTransientServerId();
// REVISIT this should use a multiple server port API when one exists?
port = poaorb.getServerEndpoint().getPort();
scid = ORBConstants.TransientSCID ;
} else {
serverid = poaorb.getPersistentServerId();
port = poaorb.getPersistentServerPort(EndPoint.IIOP_CLEAR_TEXT);
scid = ORBConstants.PersistentSCID ;
}
...
The calls to getServerEndpoint or getPersistentServerPort cause a
listen socket and thread to be created, regardless of whether an
object reference is created or exported.
If someone creates a POAORB (or the derived PIORB or Tx ORB) for
client use (which is expected, just to use interceptors) then a listen
socket will be opened.
We will need to change this code such that it at least waits to obtain
and install the port in the template until the first reference is
created (ideally it would wait until one was exported, but that is
probably too hard).