Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4374920

POAImpl creates listen sockets for client ORBS

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.4.0
    • other-libs
    • 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).

            kcavanauorcl Ken Cavanaugh (Inactive)
            hcarr Harold Carr
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: