You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by oski_bear <da...@hotmail.com> on 2016/08/26 02:58:33 UTC

Karaf 4.0.5 bundle startup order

Hello, I'm a long-time user of Karaf 2.4.0 trying to migrate my application
to Karaf 4.0.5. One thing I've noticed is that in this new version of Karaf
there doesn't seem to be any way to specify the order in which bundles are
ordered.

For example, if I specify "bootFeatures" in the karaf-maven-plugin they
don't start in the order that I list them. Additionally, when I create my
own features they don't load in the order they are written and the container
does not seem to respect the start levels.

Am I missing something here? Is there a way to enforce a certain order in
the boot features with the karaf-maven-plugin? Is there a way to force an
order when defining a feature?

Please help me understand.



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-4-0-5-bundle-startup-order-tp4047689.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf 4.0.5 bundle startup order

Posted by Guillaume Nodet <gn...@apache.org>.
2016-08-26 14:59 GMT+02:00 Guillaume Nodet <gn...@apache.org>:

> The installation order is not really relevent, what is important is the
> startup order.
> Once the list of bundles has been computed, the features service does the
> following:
>    #1: stop bundles that needs to be updated or uninstalled in order
>    #2: uninstall needed bundles
>    #3: update regions
>    #4: update bundles
>    #5: install bundles
>    #6: save state
>    #7: install configuration
>    #8: refresh bundles
>    #9: start bundles in order
>    #10: send events
>
> For point #9, bundles are split in multiple sets according to their their
> order
>

I meant they are split according to their start level, each set containing
bundles that have the same start level.


> , and in each set, they are sorted in a way that will try to ensure the
> bundles are correctly and fully resolved (see FELIX-2949, because Felix
> resolver is not greedy).
>

Note that the resolver is guided so that it will apply the resolution that
has been previously computed by the feature service.


>
> What's the problem you're trying to solve exactly ?
>
> 2016-08-26 13:56 GMT+02:00 James Carman <ja...@carmanconsulting.com>:
>
>> Wonderful. Something needs to be done about that, then.
>>
>> On Fri, Aug 26, 2016 at 7:55 AM Guillaume Nodet <gn...@apache.org>
>> wrote:
>>
>>> No, that's true for 2.x and 3.x.
>>> 4.x converts the feature list to a list of requirements, builds
>>> resources, launch the OSGi resolver, check the current state and apply the
>>> difference.
>>>
>>>
>>> 2016-08-26 13:52 GMT+02:00 James Carman <ja...@carmanconsulting.com>:
>>>
>>>> It iterates through what you hand it, doesn't it?
>>>>
>>>> On Fri, Aug 26, 2016 at 7:50 AM Guillaume Nodet <gn...@apache.org>
>>>> wrote:
>>>>
>>>>> Yeah, BootFeaturesInstaller keeps the order and pass a LinkedHashSet
>>>>> to the FeaturesServiceImpl, but that one does not care about the order by
>>>>> design.
>>>>>
>>>>>
>>>>> 2016-08-26 13:46 GMT+02:00 James Carman <ja...@carmanconsulting.com>:
>>>>>
>>>>>> We change the code to use a list ordered set, so the order is
>>>>>> preserved. It has been applied to all branches
>>>>>>
>>>>>> On Fri, Aug 26, 2016 at 7:45 AM Guillaume Nodet <gn...@apache.org>
>>>>>> wrote:
>>>>>>
>>>>>>> Afaik karaf-4642 only really applies to 3.x unless you use stages
>>>>>>> with one feature per stage.
>>>>>>> Features in a single stage are installed all at once, so the order
>>>>>>> is lost.
>>>>>>> A simple proof is to look at the list of bundles installed with a
>>>>>>> bare karaf 4.x install : the order of the installed bundles is unrelated to
>>>>>>> the order of the features listed in the configuration, that's because a
>>>>>>> single stage is used.
>>>>>>>
>>>>>>> 2016-08-26 13:14 GMT+02:00 James Carman <ja...@carmanconsulting.com>
>>>>>>> :
>>>>>>>
>>>>>>>> That's not entirely true. The featuresBoot ordering has been fixed
>>>>>>>> by
>>>>>>>> karaf-4642.
>>>>>>>>
>>>>>>>> On Fri, Aug 26, 2016 at 3:42 AM Guillaume Nodet <gn...@apache.org>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> The only way to influence the start order of bundles is to specify
>>>>>>>>> the start level on the feature or on the feature's bundles using the
>>>>>>>>> start-level attribute (see https://github.com/apache/kara
>>>>>>>>> f/blob/karaf-4.0.x/assemblies/features/standard/src/main/
>>>>>>>>> feature/feature.xml for some examples).
>>>>>>>>>
>>>>>>>>> In Karaf 4.x, the features are resolved and installed in a single
>>>>>>>>> pass, so the order is lost.
>>>>>>>>>
>>>>>>>>> 2016-08-26 4:58 GMT+02:00 oski_bear <da...@hotmail.com>:
>>>>>>>>>
>>>>>>>>>> Hello, I'm a long-time user of Karaf 2.4.0 trying to migrate my
>>>>>>>>>> application
>>>>>>>>>> to Karaf 4.0.5. One thing I've noticed is that in this new
>>>>>>>>>> version of Karaf
>>>>>>>>>> there doesn't seem to be any way to specify the order in which
>>>>>>>>>> bundles are
>>>>>>>>>> ordered.
>>>>>>>>>>
>>>>>>>>>> For example, if I specify "bootFeatures" in the
>>>>>>>>>> karaf-maven-plugin they
>>>>>>>>>> don't start in the order that I list them. Additionally, when I
>>>>>>>>>> create my
>>>>>>>>>> own features they don't load in the order they are written and
>>>>>>>>>> the container
>>>>>>>>>> does not seem to respect the start levels.
>>>>>>>>>>
>>>>>>>>>> Am I missing something here? Is there a way to enforce a certain
>>>>>>>>>> order in
>>>>>>>>>> the boot features with the karaf-maven-plugin? Is there a way to
>>>>>>>>>> force an
>>>>>>>>>> order when defining a feature?
>>>>>>>>>>
>>>>>>>>>> Please help me understand.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> View this message in context: http://karaf.922171.n3.nabble.
>>>>>>>>>> com/Karaf-4-0-5-bundle-startup-order-tp4047689.html
>>>>>>>>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> ------------------------
>>>>>>>>> Guillaume Nodet
>>>>>>>>> ------------------------
>>>>>>>>> Red Hat, Open Source Integration
>>>>>>>>>
>>>>>>>>> Email: gnodet@redhat.com
>>>>>>>>> Web: http://fusesource.com
>>>>>>>>> Blog: http://gnodet.blogspot.com/
>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> ------------------------
>>>>>>> Guillaume Nodet
>>>>>>> ------------------------
>>>>>>> Red Hat, Open Source Integration
>>>>>>>
>>>>>>> Email: gnodet@redhat.com
>>>>>>> Web: http://fusesource.com
>>>>>>> Blog: http://gnodet.blogspot.com/
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> ------------------------
>>>>> Guillaume Nodet
>>>>> ------------------------
>>>>> Red Hat, Open Source Integration
>>>>>
>>>>> Email: gnodet@redhat.com
>>>>> Web: http://fusesource.com
>>>>> Blog: http://gnodet.blogspot.com/
>>>>>
>>>>>
>>>
>>>
>>> --
>>> ------------------------
>>> Guillaume Nodet
>>> ------------------------
>>> Red Hat, Open Source Integration
>>>
>>> Email: gnodet@redhat.com
>>> Web: http://fusesource.com
>>> Blog: http://gnodet.blogspot.com/
>>>
>>>
>
>
> --
> ------------------------
> Guillaume Nodet
> ------------------------
> Red Hat, Open Source Integration
>
> Email: gnodet@redhat.com
> Web: http://fusesource.com
> Blog: http://gnodet.blogspot.com/
>
>


-- 
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration

Email: gnodet@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/

Re: Karaf 4.0.5 bundle startup order

Posted by Guillaume Nodet <gn...@apache.org>.
For a set of bundles with the same start level, the startup order is
actually determined by the installation order, but that can only be used if
you know the full deployment in advance, in which case you can order all
the bundles.  In OSGi, the assumption is that the deployment can change at
runtime, so we usually use bundle start level which take precedence.

2016-08-27 2:37 GMT+02:00 oski_bear <da...@hotmail.com>:

> Perhaps I am confusing the order of installation with the bundle start
> level.
> But let me ask you this: how can I actually verify in what order the
> bundles
> are started in from the Karaf shell?
>
> It seems like what you are saying is that the bundle id order does not
> reflect the startup order. At the very least this is unintuitive/confusing.
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.
> com/Karaf-4-0-5-bundle-startup-order-tp4047689p4047723.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration

Email: gnodet@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/

Re: Karaf 4.0.5 bundle startup order

Posted by oski_bear <da...@hotmail.com>.
Perhaps I am confusing the order of installation with the bundle start level.
But let me ask you this: how can I actually verify in what order the bundles
are started in from the Karaf shell?

It seems like what you are saying is that the bundle id order does not
reflect the startup order. At the very least this is unintuitive/confusing.



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-4-0-5-bundle-startup-order-tp4047689p4047723.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf 4.0.5 bundle startup order

Posted by Guillaume Nodet <gn...@apache.org>.
It does not ignore the start levels.

If you run "bundle:list  -t 0", you'll see a bunch of bundles with various
start levels.  Those are not set in a random fashion ;-)  So the bundle
start levels are at least set correctly.
And when I look at the debug log of the FeaturesServiceImpl, I can see the
bundles are started according to their start level during the first boot
(I've just tested both with a bare 4.0.5 install).

So I'm not sure what you've seen which wasn't working, but if you can
replicate a behavior which does not seem to respect the start level, please
raise a JIRA with a reproducible example.

2016-08-26 22:28 GMT+02:00 oski_bear <da...@hotmail.com>:

> Hi Guillaume, using the start-level, as you suggested, is one of the first
> things I tried and I was surprised that it did not have the expected
> effect.
> My determination is that Karaf 4.0.5 completely ignores the start-level.
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.
> com/Karaf-4-0-5-bundle-startup-order-tp4047689p4047718.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration

Email: gnodet@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/

Re: Karaf 4.0.5 bundle startup order

Posted by oski_bear <da...@hotmail.com>.
Hi Guillaume, using the start-level, as you suggested, is one of the first
things I tried and I was surprised that it did not have the expected effect.
My determination is that Karaf 4.0.5 completely ignores the start-level.



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-4-0-5-bundle-startup-order-tp4047689p4047718.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf 4.0.5 bundle startup order

Posted by Guillaume Nodet <gn...@apache.org>.
Have you tried the following ?

    <feature name="feature-b" version="${project.version}"
description="Feature B">
        <bundle start-level="50">mvn:com.example/
bundle-a/${project.version}</bundle>
        <bundle start-level="60">mvn:com.example/
bundle-b/${project.version}</bundle>
    </feature>

2016-08-26 20:00 GMT+02:00 oski_bear <da...@hotmail.com>:

> I was able to solve my bundle ordering issues by creating feature
> dependencies. E.g.
>
>     <feature name="feature-a" version="${project.version}"
> description="Feature A">
>         <bundle>mvn:com.example/bundle-a/${project.version}</bundle>
>     </feature>
>
>     <feature name="feature-b" version="${project.version}"
> description="Feature B">
>         <feature prerequisite="true">feature-a</feature>
>         <bundle>mvn:com.example/bundle-b/${project.version}</bundle>
>     </feature>
>
> I have some mixed feelings about this solution. On the one hand, it's nice
> that it explicitly defines the dependency between the two bundles. On the
> other hand, it means I have to write way more XML, which should turn just
> about anybody off. It would be great if there was at least a way to respect
> ordering within a feature itself. Perhaps it could be an optional
> feature-by-feature setting.
>
> Finally, it seems like this is a breaking feature with respect to 2.x
> versions of Karaf. It would be nice to at least know the rationale for
> these
> changes. I can only theorize that the changes were put in place with the
> assumption that proper OSGi bundles should be able to start in any order.
> However, there are always exceptions to this and it would be great to have
> a
> consistent way to deal with those.
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.
> com/Karaf-4-0-5-bundle-startup-order-tp4047689p4047716.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration

Email: gnodet@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/

Re: Karaf 4.0.5 bundle startup order

Posted by oski_bear <da...@hotmail.com>.
I was able to solve my bundle ordering issues by creating feature
dependencies. E.g.

    <feature name="feature-a" version="${project.version}"
description="Feature A">
        <bundle>mvn:com.example/bundle-a/${project.version}</bundle>
    </feature>

    <feature name="feature-b" version="${project.version}"
description="Feature B">
        <feature prerequisite="true">feature-a</feature>
        <bundle>mvn:com.example/bundle-b/${project.version}</bundle>
    </feature>

I have some mixed feelings about this solution. On the one hand, it's nice
that it explicitly defines the dependency between the two bundles. On the
other hand, it means I have to write way more XML, which should turn just
about anybody off. It would be great if there was at least a way to respect
ordering within a feature itself. Perhaps it could be an optional
feature-by-feature setting.

Finally, it seems like this is a breaking feature with respect to 2.x
versions of Karaf. It would be nice to at least know the rationale for these
changes. I can only theorize that the changes were put in place with the
assumption that proper OSGi bundles should be able to start in any order.
However, there are always exceptions to this and it would be great to have a
consistent way to deal with those.



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-4-0-5-bundle-startup-order-tp4047689p4047716.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf 4.0.5 bundle startup order

Posted by James Carman <ja...@carmanconsulting.com>.
Honestly, we haven't been using K4 much.  I'm going to try to bring up one
of our more troubling scenarios in K3 (< 3.0.8) and see what happens in
K4.  Thanks for the explanation, Guillaume!  Hopefully K4 "just works"! :)



On Fri, Aug 26, 2016 at 10:05 AM Guillaume Nodet <gn...@apache.org> wrote:

> Yeah, that's actually the only case where the bundle is is important afaik.
>
> However, when using Karaf 4 feature service, things are slightly different
> : let's say you have 2 features, each feature containing a bundle which
> export the same package but in different version.  If a single bundle can
> be used (that would mean they are flagged as dependencies), the feature
> service will only install one bundle.  At the end, if bundles flagged as
> dependencies won't be used in the wiring, they won't be installed at all.
>
> 2016-08-26 15:21 GMT+02:00 James Carman <ja...@carmanconsulting.com>:
>
>> The bundle id is important, especially when trying to resolve the same
>> packages from multiple bundles, because the lower bundle id is supposed to
>> be chosen when there are multiple options for the same dependency range.
>> That's what I'm trying to control mostly.
>>
>>
>> On Fri, Aug 26, 2016 at 8:59 AM Guillaume Nodet <gn...@apache.org>
>> wrote:
>>
>>> The installation order is not really relevent, what is important is the
>>> startup order.
>>> Once the list of bundles has been computed, the features service does
>>> the following:
>>>    #1: stop bundles that needs to be updated or uninstalled in order
>>>    #2: uninstall needed bundles
>>>    #3: update regions
>>>    #4: update bundles
>>>    #5: install bundles
>>>    #6: save state
>>>    #7: install configuration
>>>    #8: refresh bundles
>>>    #9: start bundles in order
>>>    #10: send events
>>>
>>> For point #9, bundles are split in multiple sets according to their
>>> their order, and in each set, they are sorted in a way that will try to
>>> ensure the bundles are correctly and fully resolved (see FELIX-2949,
>>> because Felix resolver is not greedy).
>>>
>>> What's the problem you're trying to solve exactly ?
>>>
>>> 2016-08-26 13:56 GMT+02:00 James Carman <ja...@carmanconsulting.com>:
>>>
>>>> Wonderful. Something needs to be done about that, then.
>>>>
>>>> On Fri, Aug 26, 2016 at 7:55 AM Guillaume Nodet <gn...@apache.org>
>>>> wrote:
>>>>
>>>>> No, that's true for 2.x and 3.x.
>>>>> 4.x converts the feature list to a list of requirements, builds
>>>>> resources, launch the OSGi resolver, check the current state and apply the
>>>>> difference.
>>>>>
>>>>>
>>>>> 2016-08-26 13:52 GMT+02:00 James Carman <ja...@carmanconsulting.com>:
>>>>>
>>>>>> It iterates through what you hand it, doesn't it?
>>>>>>
>>>>>> On Fri, Aug 26, 2016 at 7:50 AM Guillaume Nodet <gn...@apache.org>
>>>>>> wrote:
>>>>>>
>>>>>>> Yeah, BootFeaturesInstaller keeps the order and pass a LinkedHashSet
>>>>>>> to the FeaturesServiceImpl, but that one does not care about the order by
>>>>>>> design.
>>>>>>>
>>>>>>>
>>>>>>> 2016-08-26 13:46 GMT+02:00 James Carman <ja...@carmanconsulting.com>
>>>>>>> :
>>>>>>>
>>>>>>>> We change the code to use a list ordered set, so the order is
>>>>>>>> preserved. It has been applied to all branches
>>>>>>>>
>>>>>>>> On Fri, Aug 26, 2016 at 7:45 AM Guillaume Nodet <gn...@apache.org>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Afaik karaf-4642 only really applies to 3.x unless you use stages
>>>>>>>>> with one feature per stage.
>>>>>>>>> Features in a single stage are installed all at once, so the order
>>>>>>>>> is lost.
>>>>>>>>> A simple proof is to look at the list of bundles installed with a
>>>>>>>>> bare karaf 4.x install : the order of the installed bundles is unrelated to
>>>>>>>>> the order of the features listed in the configuration, that's because a
>>>>>>>>> single stage is used.
>>>>>>>>>
>>>>>>>>> 2016-08-26 13:14 GMT+02:00 James Carman <
>>>>>>>>> james@carmanconsulting.com>:
>>>>>>>>>
>>>>>>>>>> That's not entirely true. The featuresBoot ordering has been
>>>>>>>>>> fixed by
>>>>>>>>>> karaf-4642.
>>>>>>>>>>
>>>>>>>>>> On Fri, Aug 26, 2016 at 3:42 AM Guillaume Nodet <
>>>>>>>>>> gnodet@apache.org> wrote:
>>>>>>>>>>
>>>>>>>>>>> The only way to influence the start order of bundles is to
>>>>>>>>>>> specify the start level on the feature or on the feature's bundles using
>>>>>>>>>>> the start-level attribute (see
>>>>>>>>>>> https://github.com/apache/karaf/blob/karaf-4.0.x/assemblies/features/standard/src/main/feature/feature.xml
>>>>>>>>>>> for some examples).
>>>>>>>>>>>
>>>>>>>>>>> In Karaf 4.x, the features are resolved and installed in a
>>>>>>>>>>> single pass, so the order is lost.
>>>>>>>>>>>
>>>>>>>>>>> 2016-08-26 4:58 GMT+02:00 oski_bear <da...@hotmail.com>:
>>>>>>>>>>>
>>>>>>>>>>>> Hello, I'm a long-time user of Karaf 2.4.0 trying to migrate my
>>>>>>>>>>>> application
>>>>>>>>>>>> to Karaf 4.0.5. One thing I've noticed is that in this new
>>>>>>>>>>>> version of Karaf
>>>>>>>>>>>> there doesn't seem to be any way to specify the order in which
>>>>>>>>>>>> bundles are
>>>>>>>>>>>> ordered.
>>>>>>>>>>>>
>>>>>>>>>>>> For example, if I specify "bootFeatures" in the
>>>>>>>>>>>> karaf-maven-plugin they
>>>>>>>>>>>> don't start in the order that I list them. Additionally, when I
>>>>>>>>>>>> create my
>>>>>>>>>>>> own features they don't load in the order they are written and
>>>>>>>>>>>> the container
>>>>>>>>>>>> does not seem to respect the start levels.
>>>>>>>>>>>>
>>>>>>>>>>>> Am I missing something here? Is there a way to enforce a
>>>>>>>>>>>> certain order in
>>>>>>>>>>>> the boot features with the karaf-maven-plugin? Is there a way
>>>>>>>>>>>> to force an
>>>>>>>>>>>> order when defining a feature?
>>>>>>>>>>>>
>>>>>>>>>>>> Please help me understand.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> View this message in context:
>>>>>>>>>>>> http://karaf.922171.n3.nabble.com/Karaf-4-0-5-bundle-startup-order-tp4047689.html
>>>>>>>>>>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> ------------------------
>>>>>>>>>>> Guillaume Nodet
>>>>>>>>>>> ------------------------
>>>>>>>>>>> Red Hat, Open Source Integration
>>>>>>>>>>>
>>>>>>>>>>> Email: gnodet@redhat.com
>>>>>>>>>>> Web: http://fusesource.com
>>>>>>>>>>> Blog: http://gnodet.blogspot.com/
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> ------------------------
>>>>>>>>> Guillaume Nodet
>>>>>>>>> ------------------------
>>>>>>>>> Red Hat, Open Source Integration
>>>>>>>>>
>>>>>>>>> Email: gnodet@redhat.com
>>>>>>>>> Web: http://fusesource.com
>>>>>>>>> Blog: http://gnodet.blogspot.com/
>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> ------------------------
>>>>>>> Guillaume Nodet
>>>>>>> ------------------------
>>>>>>> Red Hat, Open Source Integration
>>>>>>>
>>>>>>> Email: gnodet@redhat.com
>>>>>>> Web: http://fusesource.com
>>>>>>> Blog: http://gnodet.blogspot.com/
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> ------------------------
>>>>> Guillaume Nodet
>>>>> ------------------------
>>>>> Red Hat, Open Source Integration
>>>>>
>>>>> Email: gnodet@redhat.com
>>>>> Web: http://fusesource.com
>>>>> Blog: http://gnodet.blogspot.com/
>>>>>
>>>>>
>>>
>>>
>>> --
>>> ------------------------
>>> Guillaume Nodet
>>> ------------------------
>>> Red Hat, Open Source Integration
>>>
>>> Email: gnodet@redhat.com
>>> Web: http://fusesource.com
>>> Blog: http://gnodet.blogspot.com/
>>>
>>>
>
>
> --
> ------------------------
> Guillaume Nodet
> ------------------------
> Red Hat, Open Source Integration
>
> Email: gnodet@redhat.com
> Web: http://fusesource.com
> Blog: http://gnodet.blogspot.com/
>
>

Re: Karaf 4.0.5 bundle startup order

Posted by Guillaume Nodet <gn...@apache.org>.
Yeah, that's actually the only case where the bundle is is important afaik.

However, when using Karaf 4 feature service, things are slightly different
: let's say you have 2 features, each feature containing a bundle which
export the same package but in different version.  If a single bundle can
be used (that would mean they are flagged as dependencies), the feature
service will only install one bundle.  At the end, if bundles flagged as
dependencies won't be used in the wiring, they won't be installed at all.

2016-08-26 15:21 GMT+02:00 James Carman <ja...@carmanconsulting.com>:

> The bundle id is important, especially when trying to resolve the same
> packages from multiple bundles, because the lower bundle id is supposed to
> be chosen when there are multiple options for the same dependency range.
> That's what I'm trying to control mostly.
>
>
> On Fri, Aug 26, 2016 at 8:59 AM Guillaume Nodet <gn...@apache.org> wrote:
>
>> The installation order is not really relevent, what is important is the
>> startup order.
>> Once the list of bundles has been computed, the features service does the
>> following:
>>    #1: stop bundles that needs to be updated or uninstalled in order
>>    #2: uninstall needed bundles
>>    #3: update regions
>>    #4: update bundles
>>    #5: install bundles
>>    #6: save state
>>    #7: install configuration
>>    #8: refresh bundles
>>    #9: start bundles in order
>>    #10: send events
>>
>> For point #9, bundles are split in multiple sets according to their their
>> order, and in each set, they are sorted in a way that will try to ensure
>> the bundles are correctly and fully resolved (see FELIX-2949, because Felix
>> resolver is not greedy).
>>
>> What's the problem you're trying to solve exactly ?
>>
>> 2016-08-26 13:56 GMT+02:00 James Carman <ja...@carmanconsulting.com>:
>>
>>> Wonderful. Something needs to be done about that, then.
>>>
>>> On Fri, Aug 26, 2016 at 7:55 AM Guillaume Nodet <gn...@apache.org>
>>> wrote:
>>>
>>>> No, that's true for 2.x and 3.x.
>>>> 4.x converts the feature list to a list of requirements, builds
>>>> resources, launch the OSGi resolver, check the current state and apply the
>>>> difference.
>>>>
>>>>
>>>> 2016-08-26 13:52 GMT+02:00 James Carman <ja...@carmanconsulting.com>:
>>>>
>>>>> It iterates through what you hand it, doesn't it?
>>>>>
>>>>> On Fri, Aug 26, 2016 at 7:50 AM Guillaume Nodet <gn...@apache.org>
>>>>> wrote:
>>>>>
>>>>>> Yeah, BootFeaturesInstaller keeps the order and pass a LinkedHashSet
>>>>>> to the FeaturesServiceImpl, but that one does not care about the order by
>>>>>> design.
>>>>>>
>>>>>>
>>>>>> 2016-08-26 13:46 GMT+02:00 James Carman <ja...@carmanconsulting.com>:
>>>>>>
>>>>>>> We change the code to use a list ordered set, so the order is
>>>>>>> preserved. It has been applied to all branches
>>>>>>>
>>>>>>> On Fri, Aug 26, 2016 at 7:45 AM Guillaume Nodet <gn...@apache.org>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Afaik karaf-4642 only really applies to 3.x unless you use stages
>>>>>>>> with one feature per stage.
>>>>>>>> Features in a single stage are installed all at once, so the order
>>>>>>>> is lost.
>>>>>>>> A simple proof is to look at the list of bundles installed with a
>>>>>>>> bare karaf 4.x install : the order of the installed bundles is unrelated to
>>>>>>>> the order of the features listed in the configuration, that's because a
>>>>>>>> single stage is used.
>>>>>>>>
>>>>>>>> 2016-08-26 13:14 GMT+02:00 James Carman <james@carmanconsulting.com
>>>>>>>> >:
>>>>>>>>
>>>>>>>>> That's not entirely true. The featuresBoot ordering has been fixed
>>>>>>>>> by
>>>>>>>>> karaf-4642.
>>>>>>>>>
>>>>>>>>> On Fri, Aug 26, 2016 at 3:42 AM Guillaume Nodet <gn...@apache.org>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> The only way to influence the start order of bundles is to
>>>>>>>>>> specify the start level on the feature or on the feature's bundles using
>>>>>>>>>> the start-level attribute (see https://github.com/apache/
>>>>>>>>>> karaf/blob/karaf-4.0.x/assemblies/features/standard/
>>>>>>>>>> src/main/feature/feature.xml for some examples).
>>>>>>>>>>
>>>>>>>>>> In Karaf 4.x, the features are resolved and installed in a single
>>>>>>>>>> pass, so the order is lost.
>>>>>>>>>>
>>>>>>>>>> 2016-08-26 4:58 GMT+02:00 oski_bear <da...@hotmail.com>:
>>>>>>>>>>
>>>>>>>>>>> Hello, I'm a long-time user of Karaf 2.4.0 trying to migrate my
>>>>>>>>>>> application
>>>>>>>>>>> to Karaf 4.0.5. One thing I've noticed is that in this new
>>>>>>>>>>> version of Karaf
>>>>>>>>>>> there doesn't seem to be any way to specify the order in which
>>>>>>>>>>> bundles are
>>>>>>>>>>> ordered.
>>>>>>>>>>>
>>>>>>>>>>> For example, if I specify "bootFeatures" in the
>>>>>>>>>>> karaf-maven-plugin they
>>>>>>>>>>> don't start in the order that I list them. Additionally, when I
>>>>>>>>>>> create my
>>>>>>>>>>> own features they don't load in the order they are written and
>>>>>>>>>>> the container
>>>>>>>>>>> does not seem to respect the start levels.
>>>>>>>>>>>
>>>>>>>>>>> Am I missing something here? Is there a way to enforce a certain
>>>>>>>>>>> order in
>>>>>>>>>>> the boot features with the karaf-maven-plugin? Is there a way to
>>>>>>>>>>> force an
>>>>>>>>>>> order when defining a feature?
>>>>>>>>>>>
>>>>>>>>>>> Please help me understand.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> View this message in context: http://karaf.922171.n3.nabble.
>>>>>>>>>>> com/Karaf-4-0-5-bundle-startup-order-tp4047689.html
>>>>>>>>>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> ------------------------
>>>>>>>>>> Guillaume Nodet
>>>>>>>>>> ------------------------
>>>>>>>>>> Red Hat, Open Source Integration
>>>>>>>>>>
>>>>>>>>>> Email: gnodet@redhat.com
>>>>>>>>>> Web: http://fusesource.com
>>>>>>>>>> Blog: http://gnodet.blogspot.com/
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> ------------------------
>>>>>>>> Guillaume Nodet
>>>>>>>> ------------------------
>>>>>>>> Red Hat, Open Source Integration
>>>>>>>>
>>>>>>>> Email: gnodet@redhat.com
>>>>>>>> Web: http://fusesource.com
>>>>>>>> Blog: http://gnodet.blogspot.com/
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> ------------------------
>>>>>> Guillaume Nodet
>>>>>> ------------------------
>>>>>> Red Hat, Open Source Integration
>>>>>>
>>>>>> Email: gnodet@redhat.com
>>>>>> Web: http://fusesource.com
>>>>>> Blog: http://gnodet.blogspot.com/
>>>>>>
>>>>>>
>>>>
>>>>
>>>> --
>>>> ------------------------
>>>> Guillaume Nodet
>>>> ------------------------
>>>> Red Hat, Open Source Integration
>>>>
>>>> Email: gnodet@redhat.com
>>>> Web: http://fusesource.com
>>>> Blog: http://gnodet.blogspot.com/
>>>>
>>>>
>>
>>
>> --
>> ------------------------
>> Guillaume Nodet
>> ------------------------
>> Red Hat, Open Source Integration
>>
>> Email: gnodet@redhat.com
>> Web: http://fusesource.com
>> Blog: http://gnodet.blogspot.com/
>>
>>


-- 
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration

Email: gnodet@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/

Re: Karaf 4.0.5 bundle startup order

Posted by James Carman <ja...@carmanconsulting.com>.
The bundle id is important, especially when trying to resolve the same
packages from multiple bundles, because the lower bundle id is supposed to
be chosen when there are multiple options for the same dependency range.
That's what I'm trying to control mostly.

On Fri, Aug 26, 2016 at 8:59 AM Guillaume Nodet <gn...@apache.org> wrote:

> The installation order is not really relevent, what is important is the
> startup order.
> Once the list of bundles has been computed, the features service does the
> following:
>    #1: stop bundles that needs to be updated or uninstalled in order
>    #2: uninstall needed bundles
>    #3: update regions
>    #4: update bundles
>    #5: install bundles
>    #6: save state
>    #7: install configuration
>    #8: refresh bundles
>    #9: start bundles in order
>    #10: send events
>
> For point #9, bundles are split in multiple sets according to their their
> order, and in each set, they are sorted in a way that will try to ensure
> the bundles are correctly and fully resolved (see FELIX-2949, because Felix
> resolver is not greedy).
>
> What's the problem you're trying to solve exactly ?
>
> 2016-08-26 13:56 GMT+02:00 James Carman <ja...@carmanconsulting.com>:
>
>> Wonderful. Something needs to be done about that, then.
>>
>> On Fri, Aug 26, 2016 at 7:55 AM Guillaume Nodet <gn...@apache.org>
>> wrote:
>>
>>> No, that's true for 2.x and 3.x.
>>> 4.x converts the feature list to a list of requirements, builds
>>> resources, launch the OSGi resolver, check the current state and apply the
>>> difference.
>>>
>>>
>>> 2016-08-26 13:52 GMT+02:00 James Carman <ja...@carmanconsulting.com>:
>>>
>>>> It iterates through what you hand it, doesn't it?
>>>>
>>>> On Fri, Aug 26, 2016 at 7:50 AM Guillaume Nodet <gn...@apache.org>
>>>> wrote:
>>>>
>>>>> Yeah, BootFeaturesInstaller keeps the order and pass a LinkedHashSet
>>>>> to the FeaturesServiceImpl, but that one does not care about the order by
>>>>> design.
>>>>>
>>>>>
>>>>> 2016-08-26 13:46 GMT+02:00 James Carman <ja...@carmanconsulting.com>:
>>>>>
>>>>>> We change the code to use a list ordered set, so the order is
>>>>>> preserved. It has been applied to all branches
>>>>>>
>>>>>> On Fri, Aug 26, 2016 at 7:45 AM Guillaume Nodet <gn...@apache.org>
>>>>>> wrote:
>>>>>>
>>>>>>> Afaik karaf-4642 only really applies to 3.x unless you use stages
>>>>>>> with one feature per stage.
>>>>>>> Features in a single stage are installed all at once, so the order
>>>>>>> is lost.
>>>>>>> A simple proof is to look at the list of bundles installed with a
>>>>>>> bare karaf 4.x install : the order of the installed bundles is unrelated to
>>>>>>> the order of the features listed in the configuration, that's because a
>>>>>>> single stage is used.
>>>>>>>
>>>>>>> 2016-08-26 13:14 GMT+02:00 James Carman <ja...@carmanconsulting.com>
>>>>>>> :
>>>>>>>
>>>>>>>> That's not entirely true. The featuresBoot ordering has been fixed
>>>>>>>> by
>>>>>>>> karaf-4642.
>>>>>>>>
>>>>>>>> On Fri, Aug 26, 2016 at 3:42 AM Guillaume Nodet <gn...@apache.org>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> The only way to influence the start order of bundles is to specify
>>>>>>>>> the start level on the feature or on the feature's bundles using the
>>>>>>>>> start-level attribute (see
>>>>>>>>> https://github.com/apache/karaf/blob/karaf-4.0.x/assemblies/features/standard/src/main/feature/feature.xml
>>>>>>>>> for some examples).
>>>>>>>>>
>>>>>>>>> In Karaf 4.x, the features are resolved and installed in a single
>>>>>>>>> pass, so the order is lost.
>>>>>>>>>
>>>>>>>>> 2016-08-26 4:58 GMT+02:00 oski_bear <da...@hotmail.com>:
>>>>>>>>>
>>>>>>>>>> Hello, I'm a long-time user of Karaf 2.4.0 trying to migrate my
>>>>>>>>>> application
>>>>>>>>>> to Karaf 4.0.5. One thing I've noticed is that in this new
>>>>>>>>>> version of Karaf
>>>>>>>>>> there doesn't seem to be any way to specify the order in which
>>>>>>>>>> bundles are
>>>>>>>>>> ordered.
>>>>>>>>>>
>>>>>>>>>> For example, if I specify "bootFeatures" in the
>>>>>>>>>> karaf-maven-plugin they
>>>>>>>>>> don't start in the order that I list them. Additionally, when I
>>>>>>>>>> create my
>>>>>>>>>> own features they don't load in the order they are written and
>>>>>>>>>> the container
>>>>>>>>>> does not seem to respect the start levels.
>>>>>>>>>>
>>>>>>>>>> Am I missing something here? Is there a way to enforce a certain
>>>>>>>>>> order in
>>>>>>>>>> the boot features with the karaf-maven-plugin? Is there a way to
>>>>>>>>>> force an
>>>>>>>>>> order when defining a feature?
>>>>>>>>>>
>>>>>>>>>> Please help me understand.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> View this message in context:
>>>>>>>>>> http://karaf.922171.n3.nabble.com/Karaf-4-0-5-bundle-startup-order-tp4047689.html
>>>>>>>>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> ------------------------
>>>>>>>>> Guillaume Nodet
>>>>>>>>> ------------------------
>>>>>>>>> Red Hat, Open Source Integration
>>>>>>>>>
>>>>>>>>> Email: gnodet@redhat.com
>>>>>>>>> Web: http://fusesource.com
>>>>>>>>> Blog: http://gnodet.blogspot.com/
>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> ------------------------
>>>>>>> Guillaume Nodet
>>>>>>> ------------------------
>>>>>>> Red Hat, Open Source Integration
>>>>>>>
>>>>>>> Email: gnodet@redhat.com
>>>>>>> Web: http://fusesource.com
>>>>>>> Blog: http://gnodet.blogspot.com/
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> ------------------------
>>>>> Guillaume Nodet
>>>>> ------------------------
>>>>> Red Hat, Open Source Integration
>>>>>
>>>>> Email: gnodet@redhat.com
>>>>> Web: http://fusesource.com
>>>>> Blog: http://gnodet.blogspot.com/
>>>>>
>>>>>
>>>
>>>
>>> --
>>> ------------------------
>>> Guillaume Nodet
>>> ------------------------
>>> Red Hat, Open Source Integration
>>>
>>> Email: gnodet@redhat.com
>>> Web: http://fusesource.com
>>> Blog: http://gnodet.blogspot.com/
>>>
>>>
>
>
> --
> ------------------------
> Guillaume Nodet
> ------------------------
> Red Hat, Open Source Integration
>
> Email: gnodet@redhat.com
> Web: http://fusesource.com
> Blog: http://gnodet.blogspot.com/
>
>

Re: Karaf 4.0.5 bundle startup order

Posted by Guillaume Nodet <gn...@apache.org>.
The installation order is not really relevent, what is important is the
startup order.
Once the list of bundles has been computed, the features service does the
following:
   #1: stop bundles that needs to be updated or uninstalled in order
   #2: uninstall needed bundles
   #3: update regions
   #4: update bundles
   #5: install bundles
   #6: save state
   #7: install configuration
   #8: refresh bundles
   #9: start bundles in order
   #10: send events

For point #9, bundles are split in multiple sets according to their their
order, and in each set, they are sorted in a way that will try to ensure
the bundles are correctly and fully resolved (see FELIX-2949, because Felix
resolver is not greedy).

What's the problem you're trying to solve exactly ?

2016-08-26 13:56 GMT+02:00 James Carman <ja...@carmanconsulting.com>:

> Wonderful. Something needs to be done about that, then.
>
> On Fri, Aug 26, 2016 at 7:55 AM Guillaume Nodet <gn...@apache.org> wrote:
>
>> No, that's true for 2.x and 3.x.
>> 4.x converts the feature list to a list of requirements, builds
>> resources, launch the OSGi resolver, check the current state and apply the
>> difference.
>>
>>
>> 2016-08-26 13:52 GMT+02:00 James Carman <ja...@carmanconsulting.com>:
>>
>>> It iterates through what you hand it, doesn't it?
>>>
>>> On Fri, Aug 26, 2016 at 7:50 AM Guillaume Nodet <gn...@apache.org>
>>> wrote:
>>>
>>>> Yeah, BootFeaturesInstaller keeps the order and pass a LinkedHashSet to
>>>> the FeaturesServiceImpl, but that one does not care about the order by
>>>> design.
>>>>
>>>>
>>>> 2016-08-26 13:46 GMT+02:00 James Carman <ja...@carmanconsulting.com>:
>>>>
>>>>> We change the code to use a list ordered set, so the order is
>>>>> preserved. It has been applied to all branches
>>>>>
>>>>> On Fri, Aug 26, 2016 at 7:45 AM Guillaume Nodet <gn...@apache.org>
>>>>> wrote:
>>>>>
>>>>>> Afaik karaf-4642 only really applies to 3.x unless you use stages
>>>>>> with one feature per stage.
>>>>>> Features in a single stage are installed all at once, so the order is
>>>>>> lost.
>>>>>> A simple proof is to look at the list of bundles installed with a
>>>>>> bare karaf 4.x install : the order of the installed bundles is unrelated to
>>>>>> the order of the features listed in the configuration, that's because a
>>>>>> single stage is used.
>>>>>>
>>>>>> 2016-08-26 13:14 GMT+02:00 James Carman <ja...@carmanconsulting.com>:
>>>>>>
>>>>>>> That's not entirely true. The featuresBoot ordering has been fixed
>>>>>>> by
>>>>>>> karaf-4642.
>>>>>>>
>>>>>>> On Fri, Aug 26, 2016 at 3:42 AM Guillaume Nodet <gn...@apache.org>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> The only way to influence the start order of bundles is to specify
>>>>>>>> the start level on the feature or on the feature's bundles using the
>>>>>>>> start-level attribute (see https://github.com/apache/
>>>>>>>> karaf/blob/karaf-4.0.x/assemblies/features/standard/
>>>>>>>> src/main/feature/feature.xml for some examples).
>>>>>>>>
>>>>>>>> In Karaf 4.x, the features are resolved and installed in a single
>>>>>>>> pass, so the order is lost.
>>>>>>>>
>>>>>>>> 2016-08-26 4:58 GMT+02:00 oski_bear <da...@hotmail.com>:
>>>>>>>>
>>>>>>>>> Hello, I'm a long-time user of Karaf 2.4.0 trying to migrate my
>>>>>>>>> application
>>>>>>>>> to Karaf 4.0.5. One thing I've noticed is that in this new version
>>>>>>>>> of Karaf
>>>>>>>>> there doesn't seem to be any way to specify the order in which
>>>>>>>>> bundles are
>>>>>>>>> ordered.
>>>>>>>>>
>>>>>>>>> For example, if I specify "bootFeatures" in the karaf-maven-plugin
>>>>>>>>> they
>>>>>>>>> don't start in the order that I list them. Additionally, when I
>>>>>>>>> create my
>>>>>>>>> own features they don't load in the order they are written and the
>>>>>>>>> container
>>>>>>>>> does not seem to respect the start levels.
>>>>>>>>>
>>>>>>>>> Am I missing something here? Is there a way to enforce a certain
>>>>>>>>> order in
>>>>>>>>> the boot features with the karaf-maven-plugin? Is there a way to
>>>>>>>>> force an
>>>>>>>>> order when defining a feature?
>>>>>>>>>
>>>>>>>>> Please help me understand.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> View this message in context: http://karaf.922171.n3.nabble.
>>>>>>>>> com/Karaf-4-0-5-bundle-startup-order-tp4047689.html
>>>>>>>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> ------------------------
>>>>>>>> Guillaume Nodet
>>>>>>>> ------------------------
>>>>>>>> Red Hat, Open Source Integration
>>>>>>>>
>>>>>>>> Email: gnodet@redhat.com
>>>>>>>> Web: http://fusesource.com
>>>>>>>> Blog: http://gnodet.blogspot.com/
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> ------------------------
>>>>>> Guillaume Nodet
>>>>>> ------------------------
>>>>>> Red Hat, Open Source Integration
>>>>>>
>>>>>> Email: gnodet@redhat.com
>>>>>> Web: http://fusesource.com
>>>>>> Blog: http://gnodet.blogspot.com/
>>>>>>
>>>>>>
>>>>
>>>>
>>>> --
>>>> ------------------------
>>>> Guillaume Nodet
>>>> ------------------------
>>>> Red Hat, Open Source Integration
>>>>
>>>> Email: gnodet@redhat.com
>>>> Web: http://fusesource.com
>>>> Blog: http://gnodet.blogspot.com/
>>>>
>>>>
>>
>>
>> --
>> ------------------------
>> Guillaume Nodet
>> ------------------------
>> Red Hat, Open Source Integration
>>
>> Email: gnodet@redhat.com
>> Web: http://fusesource.com
>> Blog: http://gnodet.blogspot.com/
>>
>>


-- 
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration

Email: gnodet@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/

Re: Karaf 4.0.5 bundle startup order

Posted by James Carman <ja...@carmanconsulting.com>.
Wonderful. Something needs to be done about that, then.
On Fri, Aug 26, 2016 at 7:55 AM Guillaume Nodet <gn...@apache.org> wrote:

> No, that's true for 2.x and 3.x.
> 4.x converts the feature list to a list of requirements, builds resources,
> launch the OSGi resolver, check the current state and apply the difference.
>
>
> 2016-08-26 13:52 GMT+02:00 James Carman <ja...@carmanconsulting.com>:
>
>> It iterates through what you hand it, doesn't it?
>>
>> On Fri, Aug 26, 2016 at 7:50 AM Guillaume Nodet <gn...@apache.org>
>> wrote:
>>
>>> Yeah, BootFeaturesInstaller keeps the order and pass a LinkedHashSet to
>>> the FeaturesServiceImpl, but that one does not care about the order by
>>> design.
>>>
>>>
>>> 2016-08-26 13:46 GMT+02:00 James Carman <ja...@carmanconsulting.com>:
>>>
>>>> We change the code to use a list ordered set, so the order is
>>>> preserved. It has been applied to all branches
>>>>
>>>> On Fri, Aug 26, 2016 at 7:45 AM Guillaume Nodet <gn...@apache.org>
>>>> wrote:
>>>>
>>>>> Afaik karaf-4642 only really applies to 3.x unless you use stages with
>>>>> one feature per stage.
>>>>> Features in a single stage are installed all at once, so the order is
>>>>> lost.
>>>>> A simple proof is to look at the list of bundles installed with a bare
>>>>> karaf 4.x install : the order of the installed bundles is unrelated to the
>>>>> order of the features listed in the configuration, that's because a single
>>>>> stage is used.
>>>>>
>>>>> 2016-08-26 13:14 GMT+02:00 James Carman <ja...@carmanconsulting.com>:
>>>>>
>>>>>> That's not entirely true. The featuresBoot ordering has been fixed by
>>>>>> karaf-4642.
>>>>>>
>>>>>> On Fri, Aug 26, 2016 at 3:42 AM Guillaume Nodet <gn...@apache.org>
>>>>>> wrote:
>>>>>>
>>>>>>> The only way to influence the start order of bundles is to specify
>>>>>>> the start level on the feature or on the feature's bundles using the
>>>>>>> start-level attribute (see
>>>>>>> https://github.com/apache/karaf/blob/karaf-4.0.x/assemblies/features/standard/src/main/feature/feature.xml
>>>>>>> for some examples).
>>>>>>>
>>>>>>> In Karaf 4.x, the features are resolved and installed in a single
>>>>>>> pass, so the order is lost.
>>>>>>>
>>>>>>> 2016-08-26 4:58 GMT+02:00 oski_bear <da...@hotmail.com>:
>>>>>>>
>>>>>>>> Hello, I'm a long-time user of Karaf 2.4.0 trying to migrate my
>>>>>>>> application
>>>>>>>> to Karaf 4.0.5. One thing I've noticed is that in this new version
>>>>>>>> of Karaf
>>>>>>>> there doesn't seem to be any way to specify the order in which
>>>>>>>> bundles are
>>>>>>>> ordered.
>>>>>>>>
>>>>>>>> For example, if I specify "bootFeatures" in the karaf-maven-plugin
>>>>>>>> they
>>>>>>>> don't start in the order that I list them. Additionally, when I
>>>>>>>> create my
>>>>>>>> own features they don't load in the order they are written and the
>>>>>>>> container
>>>>>>>> does not seem to respect the start levels.
>>>>>>>>
>>>>>>>> Am I missing something here? Is there a way to enforce a certain
>>>>>>>> order in
>>>>>>>> the boot features with the karaf-maven-plugin? Is there a way to
>>>>>>>> force an
>>>>>>>> order when defining a feature?
>>>>>>>>
>>>>>>>> Please help me understand.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> View this message in context:
>>>>>>>> http://karaf.922171.n3.nabble.com/Karaf-4-0-5-bundle-startup-order-tp4047689.html
>>>>>>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> ------------------------
>>>>>>> Guillaume Nodet
>>>>>>> ------------------------
>>>>>>> Red Hat, Open Source Integration
>>>>>>>
>>>>>>> Email: gnodet@redhat.com
>>>>>>> Web: http://fusesource.com
>>>>>>> Blog: http://gnodet.blogspot.com/
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> ------------------------
>>>>> Guillaume Nodet
>>>>> ------------------------
>>>>> Red Hat, Open Source Integration
>>>>>
>>>>> Email: gnodet@redhat.com
>>>>> Web: http://fusesource.com
>>>>> Blog: http://gnodet.blogspot.com/
>>>>>
>>>>>
>>>
>>>
>>> --
>>> ------------------------
>>> Guillaume Nodet
>>> ------------------------
>>> Red Hat, Open Source Integration
>>>
>>> Email: gnodet@redhat.com
>>> Web: http://fusesource.com
>>> Blog: http://gnodet.blogspot.com/
>>>
>>>
>
>
> --
> ------------------------
> Guillaume Nodet
> ------------------------
> Red Hat, Open Source Integration
>
> Email: gnodet@redhat.com
> Web: http://fusesource.com
> Blog: http://gnodet.blogspot.com/
>
>

Re: Karaf 4.0.5 bundle startup order

Posted by Guillaume Nodet <gn...@apache.org>.
No, that's true for 2.x and 3.x.
4.x converts the feature list to a list of requirements, builds resources,
launch the OSGi resolver, check the current state and apply the difference.

2016-08-26 13:52 GMT+02:00 James Carman <ja...@carmanconsulting.com>:

> It iterates through what you hand it, doesn't it?
>
> On Fri, Aug 26, 2016 at 7:50 AM Guillaume Nodet <gn...@apache.org> wrote:
>
>> Yeah, BootFeaturesInstaller keeps the order and pass a LinkedHashSet to
>> the FeaturesServiceImpl, but that one does not care about the order by
>> design.
>>
>>
>> 2016-08-26 13:46 GMT+02:00 James Carman <ja...@carmanconsulting.com>:
>>
>>> We change the code to use a list ordered set, so the order is preserved.
>>> It has been applied to all branches
>>>
>>> On Fri, Aug 26, 2016 at 7:45 AM Guillaume Nodet <gn...@apache.org>
>>> wrote:
>>>
>>>> Afaik karaf-4642 only really applies to 3.x unless you use stages with
>>>> one feature per stage.
>>>> Features in a single stage are installed all at once, so the order is
>>>> lost.
>>>> A simple proof is to look at the list of bundles installed with a bare
>>>> karaf 4.x install : the order of the installed bundles is unrelated to the
>>>> order of the features listed in the configuration, that's because a single
>>>> stage is used.
>>>>
>>>> 2016-08-26 13:14 GMT+02:00 James Carman <ja...@carmanconsulting.com>:
>>>>
>>>>> That's not entirely true. The featuresBoot ordering has been fixed by
>>>>> karaf-4642.
>>>>>
>>>>> On Fri, Aug 26, 2016 at 3:42 AM Guillaume Nodet <gn...@apache.org>
>>>>> wrote:
>>>>>
>>>>>> The only way to influence the start order of bundles is to specify
>>>>>> the start level on the feature or on the feature's bundles using the
>>>>>> start-level attribute (see https://github.com/apache/
>>>>>> karaf/blob/karaf-4.0.x/assemblies/features/standard/
>>>>>> src/main/feature/feature.xml for some examples).
>>>>>>
>>>>>> In Karaf 4.x, the features are resolved and installed in a single
>>>>>> pass, so the order is lost.
>>>>>>
>>>>>> 2016-08-26 4:58 GMT+02:00 oski_bear <da...@hotmail.com>:
>>>>>>
>>>>>>> Hello, I'm a long-time user of Karaf 2.4.0 trying to migrate my
>>>>>>> application
>>>>>>> to Karaf 4.0.5. One thing I've noticed is that in this new version
>>>>>>> of Karaf
>>>>>>> there doesn't seem to be any way to specify the order in which
>>>>>>> bundles are
>>>>>>> ordered.
>>>>>>>
>>>>>>> For example, if I specify "bootFeatures" in the karaf-maven-plugin
>>>>>>> they
>>>>>>> don't start in the order that I list them. Additionally, when I
>>>>>>> create my
>>>>>>> own features they don't load in the order they are written and the
>>>>>>> container
>>>>>>> does not seem to respect the start levels.
>>>>>>>
>>>>>>> Am I missing something here? Is there a way to enforce a certain
>>>>>>> order in
>>>>>>> the boot features with the karaf-maven-plugin? Is there a way to
>>>>>>> force an
>>>>>>> order when defining a feature?
>>>>>>>
>>>>>>> Please help me understand.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> View this message in context: http://karaf.922171.n3.nabble.
>>>>>>> com/Karaf-4-0-5-bundle-startup-order-tp4047689.html
>>>>>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> ------------------------
>>>>>> Guillaume Nodet
>>>>>> ------------------------
>>>>>> Red Hat, Open Source Integration
>>>>>>
>>>>>> Email: gnodet@redhat.com
>>>>>> Web: http://fusesource.com
>>>>>> Blog: http://gnodet.blogspot.com/
>>>>>>
>>>>>>
>>>>
>>>>
>>>> --
>>>> ------------------------
>>>> Guillaume Nodet
>>>> ------------------------
>>>> Red Hat, Open Source Integration
>>>>
>>>> Email: gnodet@redhat.com
>>>> Web: http://fusesource.com
>>>> Blog: http://gnodet.blogspot.com/
>>>>
>>>>
>>
>>
>> --
>> ------------------------
>> Guillaume Nodet
>> ------------------------
>> Red Hat, Open Source Integration
>>
>> Email: gnodet@redhat.com
>> Web: http://fusesource.com
>> Blog: http://gnodet.blogspot.com/
>>
>>


-- 
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration

Email: gnodet@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/

Re: Karaf 4.0.5 bundle startup order

Posted by James Carman <ja...@carmanconsulting.com>.
It iterates through what you hand it, doesn't it?

On Fri, Aug 26, 2016 at 7:50 AM Guillaume Nodet <gn...@apache.org> wrote:

> Yeah, BootFeaturesInstaller keeps the order and pass a LinkedHashSet to
> the FeaturesServiceImpl, but that one does not care about the order by
> design.
>
>
> 2016-08-26 13:46 GMT+02:00 James Carman <ja...@carmanconsulting.com>:
>
>> We change the code to use a list ordered set, so the order is preserved.
>> It has been applied to all branches
>>
>> On Fri, Aug 26, 2016 at 7:45 AM Guillaume Nodet <gn...@apache.org>
>> wrote:
>>
>>> Afaik karaf-4642 only really applies to 3.x unless you use stages with
>>> one feature per stage.
>>> Features in a single stage are installed all at once, so the order is
>>> lost.
>>> A simple proof is to look at the list of bundles installed with a bare
>>> karaf 4.x install : the order of the installed bundles is unrelated to the
>>> order of the features listed in the configuration, that's because a single
>>> stage is used.
>>>
>>> 2016-08-26 13:14 GMT+02:00 James Carman <ja...@carmanconsulting.com>:
>>>
>>>> That's not entirely true. The featuresBoot ordering has been fixed by
>>>> karaf-4642.
>>>>
>>>> On Fri, Aug 26, 2016 at 3:42 AM Guillaume Nodet <gn...@apache.org>
>>>> wrote:
>>>>
>>>>> The only way to influence the start order of bundles is to specify the
>>>>> start level on the feature or on the feature's bundles using the
>>>>> start-level attribute (see
>>>>> https://github.com/apache/karaf/blob/karaf-4.0.x/assemblies/features/standard/src/main/feature/feature.xml
>>>>> for some examples).
>>>>>
>>>>> In Karaf 4.x, the features are resolved and installed in a single
>>>>> pass, so the order is lost.
>>>>>
>>>>> 2016-08-26 4:58 GMT+02:00 oski_bear <da...@hotmail.com>:
>>>>>
>>>>>> Hello, I'm a long-time user of Karaf 2.4.0 trying to migrate my
>>>>>> application
>>>>>> to Karaf 4.0.5. One thing I've noticed is that in this new version of
>>>>>> Karaf
>>>>>> there doesn't seem to be any way to specify the order in which
>>>>>> bundles are
>>>>>> ordered.
>>>>>>
>>>>>> For example, if I specify "bootFeatures" in the karaf-maven-plugin
>>>>>> they
>>>>>> don't start in the order that I list them. Additionally, when I
>>>>>> create my
>>>>>> own features they don't load in the order they are written and the
>>>>>> container
>>>>>> does not seem to respect the start levels.
>>>>>>
>>>>>> Am I missing something here? Is there a way to enforce a certain
>>>>>> order in
>>>>>> the boot features with the karaf-maven-plugin? Is there a way to
>>>>>> force an
>>>>>> order when defining a feature?
>>>>>>
>>>>>> Please help me understand.
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://karaf.922171.n3.nabble.com/Karaf-4-0-5-bundle-startup-order-tp4047689.html
>>>>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> ------------------------
>>>>> Guillaume Nodet
>>>>> ------------------------
>>>>> Red Hat, Open Source Integration
>>>>>
>>>>> Email: gnodet@redhat.com
>>>>> Web: http://fusesource.com
>>>>> Blog: http://gnodet.blogspot.com/
>>>>>
>>>>>
>>>
>>>
>>> --
>>> ------------------------
>>> Guillaume Nodet
>>> ------------------------
>>> Red Hat, Open Source Integration
>>>
>>> Email: gnodet@redhat.com
>>> Web: http://fusesource.com
>>> Blog: http://gnodet.blogspot.com/
>>>
>>>
>
>
> --
> ------------------------
> Guillaume Nodet
> ------------------------
> Red Hat, Open Source Integration
>
> Email: gnodet@redhat.com
> Web: http://fusesource.com
> Blog: http://gnodet.blogspot.com/
>
>

Re: Karaf 4.0.5 bundle startup order

Posted by Guillaume Nodet <gn...@apache.org>.
Yeah, BootFeaturesInstaller keeps the order and pass a LinkedHashSet to the
FeaturesServiceImpl, but that one does not care about the order by design.

2016-08-26 13:46 GMT+02:00 James Carman <ja...@carmanconsulting.com>:

> We change the code to use a list ordered set, so the order is preserved.
> It has been applied to all branches
>
> On Fri, Aug 26, 2016 at 7:45 AM Guillaume Nodet <gn...@apache.org> wrote:
>
>> Afaik karaf-4642 only really applies to 3.x unless you use stages with
>> one feature per stage.
>> Features in a single stage are installed all at once, so the order is
>> lost.
>> A simple proof is to look at the list of bundles installed with a bare
>> karaf 4.x install : the order of the installed bundles is unrelated to the
>> order of the features listed in the configuration, that's because a single
>> stage is used.
>>
>> 2016-08-26 13:14 GMT+02:00 James Carman <ja...@carmanconsulting.com>:
>>
>>> That's not entirely true. The featuresBoot ordering has been fixed by
>>> karaf-4642.
>>>
>>> On Fri, Aug 26, 2016 at 3:42 AM Guillaume Nodet <gn...@apache.org>
>>> wrote:
>>>
>>>> The only way to influence the start order of bundles is to specify the
>>>> start level on the feature or on the feature's bundles using the
>>>> start-level attribute (see https://github.com/apache/
>>>> karaf/blob/karaf-4.0.x/assemblies/features/standard/
>>>> src/main/feature/feature.xml for some examples).
>>>>
>>>> In Karaf 4.x, the features are resolved and installed in a single pass,
>>>> so the order is lost.
>>>>
>>>> 2016-08-26 4:58 GMT+02:00 oski_bear <da...@hotmail.com>:
>>>>
>>>>> Hello, I'm a long-time user of Karaf 2.4.0 trying to migrate my
>>>>> application
>>>>> to Karaf 4.0.5. One thing I've noticed is that in this new version of
>>>>> Karaf
>>>>> there doesn't seem to be any way to specify the order in which bundles
>>>>> are
>>>>> ordered.
>>>>>
>>>>> For example, if I specify "bootFeatures" in the karaf-maven-plugin they
>>>>> don't start in the order that I list them. Additionally, when I create
>>>>> my
>>>>> own features they don't load in the order they are written and the
>>>>> container
>>>>> does not seem to respect the start levels.
>>>>>
>>>>> Am I missing something here? Is there a way to enforce a certain order
>>>>> in
>>>>> the boot features with the karaf-maven-plugin? Is there a way to force
>>>>> an
>>>>> order when defining a feature?
>>>>>
>>>>> Please help me understand.
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> View this message in context: http://karaf.922171.n3.nabble.
>>>>> com/Karaf-4-0-5-bundle-startup-order-tp4047689.html
>>>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> ------------------------
>>>> Guillaume Nodet
>>>> ------------------------
>>>> Red Hat, Open Source Integration
>>>>
>>>> Email: gnodet@redhat.com
>>>> Web: http://fusesource.com
>>>> Blog: http://gnodet.blogspot.com/
>>>>
>>>>
>>
>>
>> --
>> ------------------------
>> Guillaume Nodet
>> ------------------------
>> Red Hat, Open Source Integration
>>
>> Email: gnodet@redhat.com
>> Web: http://fusesource.com
>> Blog: http://gnodet.blogspot.com/
>>
>>


-- 
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration

Email: gnodet@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/

Re: Karaf 4.0.5 bundle startup order

Posted by James Carman <ja...@carmanconsulting.com>.
We change the code to use a list ordered set, so the order is preserved. It
has been applied to all branches

On Fri, Aug 26, 2016 at 7:45 AM Guillaume Nodet <gn...@apache.org> wrote:

> Afaik karaf-4642 only really applies to 3.x unless you use stages with one
> feature per stage.
> Features in a single stage are installed all at once, so the order is lost.
> A simple proof is to look at the list of bundles installed with a bare
> karaf 4.x install : the order of the installed bundles is unrelated to the
> order of the features listed in the configuration, that's because a single
> stage is used.
>
> 2016-08-26 13:14 GMT+02:00 James Carman <ja...@carmanconsulting.com>:
>
>> That's not entirely true. The featuresBoot ordering has been fixed by
>> karaf-4642.
>>
>> On Fri, Aug 26, 2016 at 3:42 AM Guillaume Nodet <gn...@apache.org>
>> wrote:
>>
>>> The only way to influence the start order of bundles is to specify the
>>> start level on the feature or on the feature's bundles using the
>>> start-level attribute (see
>>> https://github.com/apache/karaf/blob/karaf-4.0.x/assemblies/features/standard/src/main/feature/feature.xml
>>> for some examples).
>>>
>>> In Karaf 4.x, the features are resolved and installed in a single pass,
>>> so the order is lost.
>>>
>>> 2016-08-26 4:58 GMT+02:00 oski_bear <da...@hotmail.com>:
>>>
>>>> Hello, I'm a long-time user of Karaf 2.4.0 trying to migrate my
>>>> application
>>>> to Karaf 4.0.5. One thing I've noticed is that in this new version of
>>>> Karaf
>>>> there doesn't seem to be any way to specify the order in which bundles
>>>> are
>>>> ordered.
>>>>
>>>> For example, if I specify "bootFeatures" in the karaf-maven-plugin they
>>>> don't start in the order that I list them. Additionally, when I create
>>>> my
>>>> own features they don't load in the order they are written and the
>>>> container
>>>> does not seem to respect the start levels.
>>>>
>>>> Am I missing something here? Is there a way to enforce a certain order
>>>> in
>>>> the boot features with the karaf-maven-plugin? Is there a way to force
>>>> an
>>>> order when defining a feature?
>>>>
>>>> Please help me understand.
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://karaf.922171.n3.nabble.com/Karaf-4-0-5-bundle-startup-order-tp4047689.html
>>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>>
>>>
>>>
>>>
>>> --
>>> ------------------------
>>> Guillaume Nodet
>>> ------------------------
>>> Red Hat, Open Source Integration
>>>
>>> Email: gnodet@redhat.com
>>> Web: http://fusesource.com
>>> Blog: http://gnodet.blogspot.com/
>>>
>>>
>
>
> --
> ------------------------
> Guillaume Nodet
> ------------------------
> Red Hat, Open Source Integration
>
> Email: gnodet@redhat.com
> Web: http://fusesource.com
> Blog: http://gnodet.blogspot.com/
>
>

Re: Karaf 4.0.5 bundle startup order

Posted by Guillaume Nodet <gn...@apache.org>.
Afaik karaf-4642 only really applies to 3.x unless you use stages with one
feature per stage.
Features in a single stage are installed all at once, so the order is lost.
A simple proof is to look at the list of bundles installed with a bare
karaf 4.x install : the order of the installed bundles is unrelated to the
order of the features listed in the configuration, that's because a single
stage is used.

2016-08-26 13:14 GMT+02:00 James Carman <ja...@carmanconsulting.com>:

> That's not entirely true. The featuresBoot ordering has been fixed by
> karaf-4642.
>
> On Fri, Aug 26, 2016 at 3:42 AM Guillaume Nodet <gn...@apache.org> wrote:
>
>> The only way to influence the start order of bundles is to specify the
>> start level on the feature or on the feature's bundles using the
>> start-level attribute (see https://github.com/apache/
>> karaf/blob/karaf-4.0.x/assemblies/features/standard/
>> src/main/feature/feature.xml for some examples).
>>
>> In Karaf 4.x, the features are resolved and installed in a single pass,
>> so the order is lost.
>>
>> 2016-08-26 4:58 GMT+02:00 oski_bear <da...@hotmail.com>:
>>
>>> Hello, I'm a long-time user of Karaf 2.4.0 trying to migrate my
>>> application
>>> to Karaf 4.0.5. One thing I've noticed is that in this new version of
>>> Karaf
>>> there doesn't seem to be any way to specify the order in which bundles
>>> are
>>> ordered.
>>>
>>> For example, if I specify "bootFeatures" in the karaf-maven-plugin they
>>> don't start in the order that I list them. Additionally, when I create my
>>> own features they don't load in the order they are written and the
>>> container
>>> does not seem to respect the start levels.
>>>
>>> Am I missing something here? Is there a way to enforce a certain order in
>>> the boot features with the karaf-maven-plugin? Is there a way to force an
>>> order when defining a feature?
>>>
>>> Please help me understand.
>>>
>>>
>>>
>>> --
>>> View this message in context: http://karaf.922171.n3.nabble.
>>> com/Karaf-4-0-5-bundle-startup-order-tp4047689.html
>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>
>>
>>
>>
>> --
>> ------------------------
>> Guillaume Nodet
>> ------------------------
>> Red Hat, Open Source Integration
>>
>> Email: gnodet@redhat.com
>> Web: http://fusesource.com
>> Blog: http://gnodet.blogspot.com/
>>
>>


-- 
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration

Email: gnodet@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/

Re: Karaf 4.0.5 bundle startup order

Posted by James Carman <ja...@carmanconsulting.com>.
That's not entirely true. The featuresBoot ordering has been fixed by
karaf-4642.

On Fri, Aug 26, 2016 at 3:42 AM Guillaume Nodet <gn...@apache.org> wrote:

> The only way to influence the start order of bundles is to specify the
> start level on the feature or on the feature's bundles using the
> start-level attribute (see
> https://github.com/apache/karaf/blob/karaf-4.0.x/assemblies/features/standard/src/main/feature/feature.xml
> for some examples).
>
> In Karaf 4.x, the features are resolved and installed in a single pass, so
> the order is lost.
>
> 2016-08-26 4:58 GMT+02:00 oski_bear <da...@hotmail.com>:
>
>> Hello, I'm a long-time user of Karaf 2.4.0 trying to migrate my
>> application
>> to Karaf 4.0.5. One thing I've noticed is that in this new version of
>> Karaf
>> there doesn't seem to be any way to specify the order in which bundles are
>> ordered.
>>
>> For example, if I specify "bootFeatures" in the karaf-maven-plugin they
>> don't start in the order that I list them. Additionally, when I create my
>> own features they don't load in the order they are written and the
>> container
>> does not seem to respect the start levels.
>>
>> Am I missing something here? Is there a way to enforce a certain order in
>> the boot features with the karaf-maven-plugin? Is there a way to force an
>> order when defining a feature?
>>
>> Please help me understand.
>>
>>
>>
>> --
>> View this message in context:
>> http://karaf.922171.n3.nabble.com/Karaf-4-0-5-bundle-startup-order-tp4047689.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>
>
>
> --
> ------------------------
> Guillaume Nodet
> ------------------------
> Red Hat, Open Source Integration
>
> Email: gnodet@redhat.com
> Web: http://fusesource.com
> Blog: http://gnodet.blogspot.com/
>
>

Re: Karaf 4.0.5 bundle startup order

Posted by Guillaume Nodet <gn...@apache.org>.
The only way to influence the start order of bundles is to specify the
start level on the feature or on the feature's bundles using the start-level
attribute (see
https://github.com/apache/karaf/blob/karaf-4.0.x/assemblies/features/standard/src/main/feature/feature.xml
for some examples).

In Karaf 4.x, the features are resolved and installed in a single pass, so
the order is lost.

2016-08-26 4:58 GMT+02:00 oski_bear <da...@hotmail.com>:

> Hello, I'm a long-time user of Karaf 2.4.0 trying to migrate my application
> to Karaf 4.0.5. One thing I've noticed is that in this new version of Karaf
> there doesn't seem to be any way to specify the order in which bundles are
> ordered.
>
> For example, if I specify "bootFeatures" in the karaf-maven-plugin they
> don't start in the order that I list them. Additionally, when I create my
> own features they don't load in the order they are written and the
> container
> does not seem to respect the start levels.
>
> Am I missing something here? Is there a way to enforce a certain order in
> the boot features with the karaf-maven-plugin? Is there a way to force an
> order when defining a feature?
>
> Please help me understand.
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.
> com/Karaf-4-0-5-bundle-startup-order-tp4047689.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration

Email: gnodet@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/