Hello,

I am trying to understand what dependency=true means by looking at the karaf
feature code.

If resolver == null, isDependency from BundleInfo is ignored. The bundle
appears to be loaded like any other bundle.

If resolver == obr and isDependency from BundleInfo returns true, this code
is hit in the obr resolver:

    public List<BundleInfo> resolve(Feature feature) throws Exception {
        .
        .
        for (Resource res : ress) {
            if (!infos.get(res).isDependency()) {
                resolver.add(res);
            }
        }
        .
 
As these bundles are not added to the resolver, these bundles appear to be
ignored (I checked the older code and I don't think I broke it :)). Am I
missing something here?

I ask because I have been playing with activemq 5.7.0 and karaf 2.3.0. In
the feature file it defines a host of bundles related to velocity (I think)
that have dependency=true. These bundles are not loaded...yet activemq
appears to function fine. I had a look at the activemq source code to find
the velocity dependency and I see that the only thing that depends on
velocity is what appears to be a command line active mq journal tool.
Perhaps this is cross-posting but I suggest the following changes for their
feature file going forward:

(1) Remove the velocity dependencies from the feature file unless this AMQ
Journal Tool can be accessed from OSGi.

(2) The activemq feature file has a direct dependency on a specific version
of aries transaction:

<bundle
dependency="true">mvn:org.apache.aries.transaction/org.apache.aries.transaction.manager/0.3</bundle>

This causes problems running with karaf 2.3.0 as it means two versions of
aries bundles are loaded. Wouldn't it be better if the activemq feature
depended on the karaf transaction feature instead?

(3) The activemq-blueprint feature wants to depend on a specific version of
xbean-blueprint (though it appears to get the right one for karaf 2.3.0 as I
have xbean-blueprint 3.12.1 in my OBR):

<bundle
dependency="true">mvn:org.apache.xbean/xbean-blueprint/3.11.1</bundle>

Wouldn't it be better for karaf to have an xbean-blueprint feature
(specifying the right version of xbean-blueprint for the current karaf) and
activemq should depend on that karaf xbean-blueprint feature?

Do these suggestions appear reasonable?

thanks in advance,
Gareth









--
View this message in context: 
http://karaf.922171.n3.nabble.com/Bundle-dependency-true-And-The-OBR-Resolver-Also-ActiveMQ-in-Karaf-2-3-0-tp4026443.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Reply via email to