I've created a new Pax Exam option frameworkProperty() and modified the Native Container to support it (not yet tested and hence not committed).

For the Pax Runner container, this would also require a change in Pax Runner, and I need some advice on that.

As far as I can see, the system properties (or at least the ones coming from Exam options) are copied to the framework config file, which is not really the best way, so I think Pax Runner should also get a new option --frameworkProperty.

Pax Runner experts, what do you think?

Best regards,
Harald


Am 10.08.2011 05:04, schrieb Sanjeeb Sahoo:
Harald,

We are in complete agreement here. Filed an RFE to track it further:

http://team.ops4j.org/browse/PAXEXAM-261

Thanks,
Sahoo

On Wed, Aug 10, 2011 at 1:39 AM, Harald Wellmann <harald.wellm...@gmx.de
<mailto:harald.wellm...@gmx.de>> wrote:

    I noticed the same with Equinox - Pax Exam currently has no option
    for passing a property to the FrameworkFactory.newFramework(__Map)
    method used by the native container.

    I don't think the OSGi defines any explicit relation between this
    property map and system properties.

    AFAIK, it depends on the framework implementation whether or not a
    system property has the same effect as config property in this Map.

    For Equinox, it makes no difference (at least for the most common
    properties), I don't know about Felix...

    Any system properties defined in the Pax Exam @Configuration method by

      systemProperty(key, value)

    will be set when the framework is launched.

    Example:

      systemProperty("osgi.console", "6666")

    Maybe that helps for Felix also?

    Anyway, copying all system properties is probably not the best idea.
    I think Pax Exam should really provide a new option

      frameworkProperty(key, value)

    to cover this case safely and in full generality.

    Best regards,
    Harald

    Am 09.08.2011 21:24, schrieb Sanjeeb Sahoo:

        I just ran across a situation where I had to configure a property
        specific to Felix, but I could not do it. The code in Felix consults
        only the configuration map passed to
        FrameworkFactory.__createFramework,
        but there is no way to configure this while using native test
        container.
        Should NativeTestContainer copy all the system property options
        to the
        config map in createFrameworkProperties method?

        Thanks,
        Sahoo


    _________________________________________________
    general mailing list
    general@lists.ops4j.org <mailto:general@lists.ops4j.org>
    http://lists.ops4j.org/__mailman/listinfo/general
    <http://lists.ops4j.org/mailman/listinfo/general>




_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general


_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to