Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-2063

[karaf] hardcoding org.ops4j.pax.exam.rbc.rmi.port property in raw pax runner --vmOptions is problematic when 1099 is not the next free port

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • karaf-1.4.0
    • karaf-1.4.0
    • Karaf
    • None

    Description

      Pax-runner calculates the next free port to use on the "client side" of the RMI connection, whereas the "server side" RMI registry takes its port from the org.ops4j.pax.exam.rbc.rmi.port property regardless of whether this is free or not.

      Therefore the org.ops4j.pax.exam.rbc.rmi.port should not be hard-coded via the rawPaxRunnerOption("--vmOptions", ...) mechanism.

      Now the whole point of setting the raw --vmOptions was to avoid the karaf-specific system.packages setting being overridden by pax-runner. However a similar effect can be achieved without having to specify a org.ops4j.pax.exam.rbc.rmi.port property if the org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption is used instead of the org.ops4j.pax.exam.container.def.PaxRunnerOptions.rawPaxRunnerOption.

      This approach appears to work even when another process is hogging port 1099.

      Attachments

        1. felix_2063.patch
          2 kB
          Eoghan Glynn

        Activity

          People

            ccustine Chris Custine
            eglynn Eoghan Glynn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: