2 Replies Latest reply on Jan 15, 2013 4:22 AM by davsclaus

    Translating maven dependency of 'activemq-all' for FAB deployment with FMC

    komododave

      We have a JAR project with a transitive dependency of activemq-all:5.5.1. We're trying to deploy our JAR as a FAB via FMC.

       

      The following is a provisioning error listed in FMC. We will reference this later.

       

      Provision Exception Trace: java.lang.Exception: Can not resolve feature:

      Unsatisfied requirement(s):

      ----


      package:(&(package=javax.transaction.xa)(version>=5.5.1)(!(version>=6.0.0)))

      com.anon.our-artifactId

      package:(&(package=javax.jms)(version>=5.5.1)(!(version>=6.0.0)))

      com.anon.our-artifactId

       

      We're aware of the contents of activemq-all thanks to  this page .

       

      Running features:list | grep -i activemq in the container we're attempting to deploy the FAB to displays:

       

      activemq                              activemq-5.7.0.fuse-71-047        

      activemq-spring                       activemq-5.7.0.fuse-71-047        

      activemq-blueprint                    activemq-5.7.0.fuse-71-047        

      activemq-optional                     activemq-5.7.0.fuse-71-047        

      activemq-camel                        activemq-5.7.0.fuse-71-047        

      activemq-extra                        activemq-5.7.0.fuse-71-047        

      activemq                              cxf-2.6.0.fuse-71-047

       

      Assuming the activemq feature listed here with version 5.4.2 corresponds with the activemq-all JAR, how do we get our project to use this?

       

      We can change the dependency to activemq:5.4.2, however this won't resolve as a valid Maven artifact because no ActiveMQ artifact publicly available is named this as far as we're aware. Consequently we can't successfully build the FAB JAR to use this feature.

       

      We summarise our key questions here:

       

      1. Are we correct to assume that the activemq feature listed by fabric corresponds with the activemq-all Maven artifact?

       

      2. Your documentation states  here that "When a FAB is installed it is converted into a valid OSGi bundle dealing with its transitive dependencies." If this is true, why doesn't our JAR deploy as a FAB out of the box? We know all its dependencies, transitive and otherwise, exist in the repositories configured for the fabric agent and fabric maven proxy. So surely activemq, along with all other dependencies (such as those listed in the error near the top of this post e.g. javax.jms), should be automatically OSGi-fied without issue? Yet if we do not the fuse-esb-medium/full profile applied to our FAB container, the error near the top of this post has one additional Package.. entry for activemq. And even with one of those ESB profiles applied to the container, the error appears exactly as you see it now with 2 problem packages.

       

      3. There is a suggestion  here that the ActiveMQ JARs are already OSGi-fied. From our perspective there is no mechanism in FMC via which we can take advantage of this and deploy the JAR as a bundle, because we would need to create/find a bundle repository to add the JAR to in order that FMC could recognise it as a bundle. Is this assumption correct?

       

      4. Following on from (3), will deploying an OSGi-fied JAR aka Bundle as a FAB work properly, i.e. will the internal OSGi-fication mechanism of Fabric handle the case where a JAR's manifest already contains Bundle headers and the archive potentially contains a BundleActivator?

       

      Thank you for your time.