johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Seifert (JIRA)" <j...@apache.org>
Subject [jira] [Created] (JOHNZON-107) Add 'SPI-Provider' bundle header to johnzon-core
Date Fri, 10 Mar 2017 22:27:04 GMT
Stefan Seifert created JOHNZON-107:
--------------------------------------

             Summary: Add 'SPI-Provider' bundle header to johnzon-core
                 Key: JOHNZON-107
                 URL: https://issues.apache.org/jira/browse/JOHNZON-107
             Project: Johnzon
          Issue Type: Improvement
    Affects Versions: 1.0.0
            Reporter: Stefan Seifert


Johnzon 1.0.0 together with {{org.apache.geronimo.specs:geronimo-json_1.0_spec:1.0-alpha-1}}
currently does not work within OSGi envrionments - the service loader does not found the implementation
class (see GERONIMO-6560).

getting service loaders right in OSGi is a bit tricky. there are solutions to support this
e.g.:
* https://github.com/apache/geronimo-specs/tree/trunk/geronimo-osgi-support
* http://aries.apache.org/modules/spi-fly.html

both need an "opt-in" that means provider bundles like johnzon-core have to add special instructions
in their manifest to notice the environment it provides some service loader implementations.

since OSGi R5 there is a spec compliant way to do this (covered in the [OSGi Enterprise Specification|http://www.osgi.org/Download/Release5]
version 5 chapter 133), but this is currently only supported by the aries spyfly implementation,
not by the geronimo spec implementation.

thus my proposal is to simply add a header
{noformat}
SPI-Provider: *
{noformat}
to johnzon-core - this is supporty by both aries spyfly as the geronimo spec implementation.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message