You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Christian Schneider <ch...@die-schneider.net> on 2013/05/23 10:21:03 UTC

Start levels and some other changes in Karaf features

I am currently working on:
https://issues.apache.org/jira/browse/CXF-5030

It seems that we use an incorrect start level and order for the xmlsec 
dependency. I have just committed the fix for this.

While correcting this I found that we have a lot of different start 
levels. I am quite sure we should not need all of these.

I have created a wiki page with the current start levels and the meaning 
I figured out:
https://cwiki.apache.org/confluence/display/CXF20DOC/CXF+feature+for+Apache+Karaf

Could you guys review this? I wonder if we could remove some of the 
start levels.
I think we could limit it to just 9,10,20,30.

Another issue is that there are also some duplicates in the bundles. For 
example we start the JAXB impls in cxf-specs and cxf-jaxb.

What do you think?

Christian

-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


Re: Start levels and some other changes in Karaf features

Posted by Freeman Fang <fr...@gmail.com>.
I'm with Guillaume here.

Also about the duplicated bundles, as we have OBR resolver already, which can prevent to install redundant bundles. And although some bundles are duplicated in different features, I'd see features are more self-contained and some features from cxf features.xml are used in down stream projects, so I prefer to keep it as is.

Thanks
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋

www.camelone.org : The open source integration conference: 

On 2013-5-23, at 下午5:42, Guillaume Nodet wrote:

> Fwiw, having a more fine grained start level helps reducing the log
> verbosity at start time and may slightly help with performance too.  The
> reason is that a correct start order will result in service dependencies
> being satisfied correctly for most bundles, thus not having to wait until
> those are satisfied later.
> At startup, it also helps having the low-level services up and ready early
> in the process (pax-logging, pax-url, etc...).
> So while reducing the number of start levels should perfectly work, I'm not
> sure what the benefit is really.
> 
> 
> 2013/5/23 Christian Schneider <ch...@die-schneider.net>
> 
>> I am currently working on:
>> https://issues.apache.org/**jira/browse/CXF-5030<https://issues.apache.org/jira/browse/CXF-5030>
>> 
>> It seems that we use an incorrect start level and order for the xmlsec
>> dependency. I have just committed the fix for this.
>> 
>> While correcting this I found that we have a lot of different start
>> levels. I am quite sure we should not need all of these.
>> 
>> I have created a wiki page with the current start levels and the meaning I
>> figured out:
>> https://cwiki.apache.org/**confluence/display/CXF20DOC/**
>> CXF+feature+for+Apache+Karaf<https://cwiki.apache.org/confluence/display/CXF20DOC/CXF+feature+for+Apache+Karaf>
>> 
>> Could you guys review this? I wonder if we could remove some of the start
>> levels.
>> I think we could limit it to just 9,10,20,30.
>> 
>> Another issue is that there are also some duplicates in the bundles. For
>> example we start the JAXB impls in cxf-specs and cxf-jaxb.
>> 
>> What do you think?
>> 
>> Christian
>> 
>> --
>> Christian Schneider
>> http://www.liquid-reality.de
>> 
>> Open Source Architect
>> http://www.talend.com
>> 
>> 


Re: Start levels and some other changes in Karaf features

Posted by Christian Schneider <ch...@die-schneider.net>.
Hi Guillaume,

for the case of opensaml I think the real solution is to make the 
dependency to xmlsec non optional.
Freeman already solved this. With my patch I did not yet change the 
start levels but I hope to have all
wss4j bundles at the same start level 30.

I started this thread to discuss where start levels are needed for CXF. 
I agree that we should avoid different start levels.

So from your side which start levels do you think are really needed for CXF?
Is it true that we need three start levels for the registry, spec and 
impl bundles?
Can the rest of cxf be on the same start level of e.g 30?

Christian


Am 23.05.2013 13:38, schrieb Guillaume Nodet:
> The first rule when using start levels is "don't use them".  When they are
> *necessary*, it means the bundles misbehave, so if there's something to
> explain to the users, that's really this rule (which does not prevent users
> to actually use them, but this decision need to be taken wisely).
>
> In the CXF case, I don't think using start levels is a good solution.  The
> issue you point seems to indicate a resolution order problem, which has
> nothing to do with bundle start levels.
> Remember start level only control when bundles are started, i.e. when they
> usually start consuming or producing OSGi services, so the fact a package
> has been resolved or not is completely unrelated.  So I'd like to
> understand the side effect and see if we can rather provide a clean
> solution for the problem instead of misusing start levels.
>
> 2013/5/23 Christian Schneider <ch...@die-schneider.net>
>
>> It will be no immediate improvement but it will give us a clear concept
>> how to use start levels.
>> So I hope that people do not simply introduce new start levels without
>> checking the concept.
>>
>> There is also a "side effect". I am currently building a CXF distro based
>> on a P2 Repository for a project.
>> There it is a bit more difficult to use start levels. So I want to make
>> sure we only use the ones that are really necessary.
>> Btw. I hope I can port my efforts back to CXF so others can use it too.
>>
>> Christian
>>
>>
>> On 23.05.2013 12:12, Jean-Baptiste Onofré wrote:
>>
>>> Agree, it doesn't have impact to change the log level to use "simple"
>>> ones, but I don't see a big value.
>>>
>>> Regards
>>> JB
>>>
>> --
>> Christian Schneider
>> http://www.liquid-reality.de
>>
>> Open Source Architect
>> http://www.talend.com
>>
>>


-- 
  
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com


Re: Start levels and some other changes in Karaf features

Posted by Guillaume Nodet <gn...@apache.org>.
The first rule when using start levels is "don't use them".  When they are
*necessary*, it means the bundles misbehave, so if there's something to
explain to the users, that's really this rule (which does not prevent users
to actually use them, but this decision need to be taken wisely).

In the CXF case, I don't think using start levels is a good solution.  The
issue you point seems to indicate a resolution order problem, which has
nothing to do with bundle start levels.
Remember start level only control when bundles are started, i.e. when they
usually start consuming or producing OSGi services, so the fact a package
has been resolved or not is completely unrelated.  So I'd like to
understand the side effect and see if we can rather provide a clean
solution for the problem instead of misusing start levels.

2013/5/23 Christian Schneider <ch...@die-schneider.net>

> It will be no immediate improvement but it will give us a clear concept
> how to use start levels.
> So I hope that people do not simply introduce new start levels without
> checking the concept.
>
> There is also a "side effect". I am currently building a CXF distro based
> on a P2 Repository for a project.
> There it is a bit more difficult to use start levels. So I want to make
> sure we only use the ones that are really necessary.
> Btw. I hope I can port my efforts back to CXF so others can use it too.
>
> Christian
>
>
> On 23.05.2013 12:12, Jean-Baptiste Onofré wrote:
>
>> Agree, it doesn't have impact to change the log level to use "simple"
>> ones, but I don't see a big value.
>>
>> Regards
>> JB
>>
>
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> http://www.talend.com
>
>

Re: Start levels and some other changes in Karaf features

Posted by Christian Schneider <ch...@die-schneider.net>.
It will be no immediate improvement but it will give us a clear concept 
how to use start levels.
So I hope that people do not simply introduce new start levels without 
checking the concept.

There is also a "side effect". I am currently building a CXF distro 
based on a P2 Repository for a project.
There it is a bit more difficult to use start levels. So I want to make 
sure we only use the ones that are really necessary.
Btw. I hope I can port my efforts back to CXF so others can use it too.

Christian

On 23.05.2013 12:12, Jean-Baptiste Onofré wrote:
> Agree, it doesn't have impact to change the log level to use "simple" 
> ones, but I don't see a big value.
>
> Regards
> JB

-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


Re: Start levels and some other changes in Karaf features

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Agree, it doesn't have impact to change the log level to use "simple" 
ones, but I don't see a big value.

Regards
JB

On 05/23/2013 11:42 AM, Guillaume Nodet wrote:
> Fwiw, having a more fine grained start level helps reducing the log
> verbosity at start time and may slightly help with performance too.  The
> reason is that a correct start order will result in service dependencies
> being satisfied correctly for most bundles, thus not having to wait until
> those are satisfied later.
> At startup, it also helps having the low-level services up and ready early
> in the process (pax-logging, pax-url, etc...).
> So while reducing the number of start levels should perfectly work, I'm not
> sure what the benefit is really.
>
>
> 2013/5/23 Christian Schneider <ch...@die-schneider.net>
>
>> I am currently working on:
>> https://issues.apache.org/**jira/browse/CXF-5030<https://issues.apache.org/jira/browse/CXF-5030>
>>
>> It seems that we use an incorrect start level and order for the xmlsec
>> dependency. I have just committed the fix for this.
>>
>> While correcting this I found that we have a lot of different start
>> levels. I am quite sure we should not need all of these.
>>
>> I have created a wiki page with the current start levels and the meaning I
>> figured out:
>> https://cwiki.apache.org/**confluence/display/CXF20DOC/**
>> CXF+feature+for+Apache+Karaf<https://cwiki.apache.org/confluence/display/CXF20DOC/CXF+feature+for+Apache+Karaf>
>>
>> Could you guys review this? I wonder if we could remove some of the start
>> levels.
>> I think we could limit it to just 9,10,20,30.
>>
>> Another issue is that there are also some duplicates in the bundles. For
>> example we start the JAXB impls in cxf-specs and cxf-jaxb.
>>
>> What do you think?
>>
>> Christian
>>
>> --
>> Christian Schneider
>> http://www.liquid-reality.de
>>
>> Open Source Architect
>> http://www.talend.com
>>
>>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Start levels and some other changes in Karaf features

Posted by Guillaume Nodet <gn...@apache.org>.
Fwiw, having a more fine grained start level helps reducing the log
verbosity at start time and may slightly help with performance too.  The
reason is that a correct start order will result in service dependencies
being satisfied correctly for most bundles, thus not having to wait until
those are satisfied later.
At startup, it also helps having the low-level services up and ready early
in the process (pax-logging, pax-url, etc...).
So while reducing the number of start levels should perfectly work, I'm not
sure what the benefit is really.


2013/5/23 Christian Schneider <ch...@die-schneider.net>

> I am currently working on:
> https://issues.apache.org/**jira/browse/CXF-5030<https://issues.apache.org/jira/browse/CXF-5030>
>
> It seems that we use an incorrect start level and order for the xmlsec
> dependency. I have just committed the fix for this.
>
> While correcting this I found that we have a lot of different start
> levels. I am quite sure we should not need all of these.
>
> I have created a wiki page with the current start levels and the meaning I
> figured out:
> https://cwiki.apache.org/**confluence/display/CXF20DOC/**
> CXF+feature+for+Apache+Karaf<https://cwiki.apache.org/confluence/display/CXF20DOC/CXF+feature+for+Apache+Karaf>
>
> Could you guys review this? I wonder if we could remove some of the start
> levels.
> I think we could limit it to just 9,10,20,30.
>
> Another issue is that there are also some duplicates in the bundles. For
> example we start the JAXB impls in cxf-specs and cxf-jaxb.
>
> What do you think?
>
> Christian
>
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> http://www.talend.com
>
>

Re: Start levels and some other changes in Karaf features

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi Christian,

I just looked through that feature file, since you need either the
http-whiteboard feature or the jetty feature for it to run, are you sure
about all those dependencies?
Cause some of them like the activation-api should already be inlcuded by
pax-jetty feature, no?

regards, Achim


2013/5/23 Jean-Baptiste Onofré <jb...@nanthrax.net>

> +1 to limit the start levels.
>
> Regards
> JB
>
>
> On 05/23/2013 10:21 AM, Christian Schneider wrote:
>
>> I am currently working on:
>> https://issues.apache.org/**jira/browse/CXF-5030<https://issues.apache.org/jira/browse/CXF-5030>
>>
>> It seems that we use an incorrect start level and order for the xmlsec
>> dependency. I have just committed the fix for this.
>>
>> While correcting this I found that we have a lot of different start
>> levels. I am quite sure we should not need all of these.
>>
>> I have created a wiki page with the current start levels and the meaning
>> I figured out:
>> https://cwiki.apache.org/**confluence/display/CXF20DOC/**
>> CXF+feature+for+Apache+Karaf<https://cwiki.apache.org/confluence/display/CXF20DOC/CXF+feature+for+Apache+Karaf>
>>
>>
>> Could you guys review this? I wonder if we could remove some of the
>> start levels.
>> I think we could limit it to just 9,10,20,30.
>>
>> Another issue is that there are also some duplicates in the bundles. For
>> example we start the JAXB impls in cxf-specs and cxf-jaxb.
>>
>> What do you think?
>>
>> Christian
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 

Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home>
Commiter & Project Lead
blog <http://notizblog.nierbeck.de/>

Re: Start levels and some other changes in Karaf features

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
+1 to limit the start levels.

Regards
JB

On 05/23/2013 10:21 AM, Christian Schneider wrote:
> I am currently working on:
> https://issues.apache.org/jira/browse/CXF-5030
>
> It seems that we use an incorrect start level and order for the xmlsec
> dependency. I have just committed the fix for this.
>
> While correcting this I found that we have a lot of different start
> levels. I am quite sure we should not need all of these.
>
> I have created a wiki page with the current start levels and the meaning
> I figured out:
> https://cwiki.apache.org/confluence/display/CXF20DOC/CXF+feature+for+Apache+Karaf
>
>
> Could you guys review this? I wonder if we could remove some of the
> start levels.
> I think we could limit it to just 9,10,20,30.
>
> Another issue is that there are also some duplicates in the bundles. For
> example we start the JAXB impls in cxf-specs and cxf-jaxb.
>
> What do you think?
>
> Christian
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com