code: private int getPort()
          throws BundleException
      {
          // The port is usually given by starting client (owner of this process).
          try
          {
              return Integer.parseInt( System.getProperty( Constants.RMI_PORT_PROPERTY ) );
          }
          catch( NumberFormatException e )
          {
              throw new BundleException(
                  "Cannot determine rmi registry port. Ensure that property "
                  + Constants.RMI_PORT_PROPERTY
                  + " is set to a valid Integer."
              );
          }
      }
docs: @return the port where {@link RemoteBundleContext} is being exposed as an RMI service.
  
  @throws BundleException - If communication port cannot be determined