activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gnodet <...@git.apache.org>
Subject [GitHub] activemq-artemis pull request #1307: [ARTEMIS-1196] Fix missing JSON support
Date Thu, 22 Jun 2017 16:29:12 GMT
Github user gnodet commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1307#discussion_r123559429
  
    --- Diff: artemis-features/src/main/resources/features.xml ---
    @@ -54,8 +54,8 @@
     		<bundle dependency="true">mvn:org.jboss.logging/jboss-logging/${jboss.logging.version}</bundle>
     		<bundle dependency="true">mvn:org.jgroups/jgroups/${jgroups.version}</bundle>
     
    -		<bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-json_1.0_spec/${json-p.spec.version}</bundle>
    -		<bundle dependency="true">mvn:org.apache.johnzon/johnzon-core/${johnzon.version}</bundle>
    +		<bundle dependency="true">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.json-api-1.1/2.8-SNAPSHOT</bundle>
    --- End diff --
    
    So the servicemix specs rewrap the standard specs but add some specifics to OSGi, i.e.
each spec includes an OSGi activator which scans OSGi bundles for providers of the specification
by scanning the META-INF/services folder. It will use the results of the scanning when a user
uses the spec to create an instance.  In a J2SE env, this is done by the spec by looking at
the classpath and scanning META-INF/services, but in OSGi, the user package and the spec package
to not have visibility over those packages from the provider, so it fails.
    Geronimo specs actually do a somewhat similar thing, but in a somewhat different way,
in particular it requires an additional bundle to do the scanning.  The karaf ecosystem usually
uses the servicemix specs instead.
    Furthermore, in this very case, the OSGi metadata of the geronimo spec is slightly broken
and even if the additional bundle was deployed, the json spec bundle would not be able to
see it, so the provider loading mechanism in OSGi can't work as is.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message