Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Won't Fix
-
1.0.0
-
None
-
None
-
None
Description
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 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
SPI-Provider: *
to johnzon-core - this is supporty by both aries spyfly as the geronimo spec implementation.
Attachments
Issue Links
- is superceded by
-
JOHNZON-108 Add dynamic ServiceLoader support for OSGi environments
- Resolved
- relates to
-
GERONIMO-6560 JSON spec jar is not able to load provider in an OSGi environment
- Resolved