You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Igor Raizin <ig...@gmail.com> on 2014/10/08 10:13:09 UTC

A bug in bundle states display..?

Hello!

I gave a try to extend the bundle state in bundle:list command.

I tried to implement the *org.apache.karaf.bundle.core.BundleStateService*
in the same way as *org.apache.karaf.bundle.core.internal.BlueprintListener*
provides state for the blueprint.

At the end I faced the issue...
A bundle is in *Active *state, blueprint started successfully and my
*BundleStateService* returns *Failure* state -> the result state in
bundle:list is *Active, *but I expect to see *Failure*.

In debug mode I saw in
*org.apache.karaf.bundle.core.internal.BundleServiceImpl#getInfo
*the *BlueprintListener *is the last in list to check the state and it
overrides the *Failure *state from my *BundleStateService*....

Is this a bug or it was done on purpose?
If the second than if there any other way to show the bundle state *Failure
*basing on some condition other than blueprint errors or OSGI bundle state?


Thanks for your help.

WBR,
Igor

Re: A bug in bundle states display..?

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Igor,

Thanks for the update. Let me take a look.

Regards
JB

On 10/08/2014 10:30 AM, Igor Raizin wrote:
> Hi JB,
>
> it was karaf 3.0 release
>
> Thanks,
> Igor
>
> С уважением,
> Игорь
>
> On 8 October 2014 11:28, Jean-Baptiste Onofré <jb@nanthrax.net
> <ma...@nanthrax.net>> wrote:
>
>     Hi Igor,
>
>     with which Karaf version (in order to try to reproduce) ?
>
>     Regards
>     JB
>
>     On 10/08/2014 10:13 AM, Igor Raizin wrote:
>
>         Hello!
>
>         I gave a try to extend the bundle state in bundle:list command.
>
>         I tried to implement the
>         /org.apache.karaf.bundle.core.__BundleStateService/ in the same
>         way as
>         /org.apache.karaf.bundle.core.__internal.BlueprintListener/
>         provides state
>         for the blueprint.
>
>         At the end I faced the issue...
>         A bundle is in /Active /state, blueprint started successfully and my
>         /BundleStateService/ returns /Failure/ state -> the result state in
>         bundle:list is /Active, /but I expect to see /Failure/.
>
>         In debug mode I saw in
>         /org.apache.karaf.bundle.core.__internal.BundleServiceImpl#__getInfo
>         /the
>         /BlueprintListener /is the last in list to check the state and it
>         overrides the /Failure /state from my /BundleStateService/....
>
>         Is this a bug or it was done on purpose?
>         If the second than if there any other way to show the bundle state
>         /Failure /basing on some condition other than blueprint errors
>         or OSGI
>         bundle state?
>
>
>         Thanks for your help.
>
>         WBR,
>         Igor
>
>
>     --
>     Jean-Baptiste Onofré
>     jbonofre@apache.org <ma...@apache.org>
>     http://blog.nanthrax.net
>     Talend - http://www.talend.com
>
>

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

Re: A bug in bundle states display..?

Posted by Igor Raizin <ig...@gmail.com>.
Hi JB,

it was karaf 3.0 release

Thanks,
Igor

С уважением,
Игорь

On 8 October 2014 11:28, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:

> Hi Igor,
>
> with which Karaf version (in order to try to reproduce) ?
>
> Regards
> JB
>
> On 10/08/2014 10:13 AM, Igor Raizin wrote:
>
>> Hello!
>>
>> I gave a try to extend the bundle state in bundle:list command.
>>
>> I tried to implement the
>> /org.apache.karaf.bundle.core.BundleStateService/ in the same way as
>> /org.apache.karaf.bundle.core.internal.BlueprintListener/ provides state
>> for the blueprint.
>>
>> At the end I faced the issue...
>> A bundle is in /Active /state, blueprint started successfully and my
>> /BundleStateService/ returns /Failure/ state -> the result state in
>> bundle:list is /Active, /but I expect to see /Failure/.
>>
>> In debug mode I saw in
>> /org.apache.karaf.bundle.core.internal.BundleServiceImpl#getInfo /the
>> /BlueprintListener /is the last in list to check the state and it
>> overrides the /Failure /state from my /BundleStateService/....
>>
>> Is this a bug or it was done on purpose?
>> If the second than if there any other way to show the bundle state
>> /Failure /basing on some condition other than blueprint errors or OSGI
>> bundle state?
>>
>>
>> Thanks for your help.
>>
>> WBR,
>> Igor
>>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Re: A bug in bundle states display..?

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Igor,

with which Karaf version (in order to try to reproduce) ?

Regards
JB

On 10/08/2014 10:13 AM, Igor Raizin wrote:
> Hello!
>
> I gave a try to extend the bundle state in bundle:list command.
>
> I tried to implement the
> /org.apache.karaf.bundle.core.BundleStateService/ in the same way as
> /org.apache.karaf.bundle.core.internal.BlueprintListener/ provides state
> for the blueprint.
>
> At the end I faced the issue...
> A bundle is in /Active /state, blueprint started successfully and my
> /BundleStateService/ returns /Failure/ state -> the result state in
> bundle:list is /Active, /but I expect to see /Failure/.
>
> In debug mode I saw in
> /org.apache.karaf.bundle.core.internal.BundleServiceImpl#getInfo /the
> /BlueprintListener /is the last in list to check the state and it
> overrides the /Failure /state from my /BundleStateService/....
>
> Is this a bug or it was done on purpose?
> If the second than if there any other way to show the bundle state
> /Failure /basing on some condition other than blueprint errors or OSGI
> bundle state?
>
>
> Thanks for your help.
>
> WBR,
> Igor

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

Re: A bug in bundle states display..?

Posted by Igor Raizin <ig...@gmail.com>.
Hello Chris,

Yes sure. I've just done it:
https://issues.apache.org/jira/browse/KARAF-3267

Thanks for the help.

I might have some time to provide unit test for this bug. I'll attach it to
the ticket.


WBR,
Igor

On 9 October 2014 10:13, Christian Schneider <ch...@die-schneider.net>
wrote:

>  Looks like a bug. I think the current model for displaying state does
> not handle the case well where there are more than one
> *BundleStateService* that applies to a given bundle.
>
> Can you open an issue?
>
> Christian
>
>
> On 08.10.2014 10:13, Igor Raizin wrote:
>
> Hello!
>
>  I gave a try to extend the bundle state in bundle:list command.
>
>  I tried to implement the
> *org.apache.karaf.bundle.core.BundleStateService* in the same way as
> *org.apache.karaf.bundle.core.internal.BlueprintListener* provides state
> for the blueprint.
>
>  At the end I faced the issue...
> A bundle is in *Active *state, blueprint started successfully and my
> *BundleStateService* returns *Failure* state -> the result state in
> bundle:list is *Active, *but I expect to see *Failure*.
>
>  In debug mode I saw in *org.apache.karaf.bundle.core.internal.BundleServiceImpl#getInfo
> *the *BlueprintListener *is the last in list to check the state and it
> overrides the *Failure *state from my *BundleStateService*....
>
>  Is this a bug or it was done on purpose?
> If the second than if there any other way to show the bundle state *Failure
> *basing on some condition other than blueprint errors or OSGI bundle
> state?
>
>
>  Thanks for your help.
>
>  WBR,
> Igor
>
>
>
> --
> Christian Schneiderhttp://www.liquid-reality.de
>
> Open Source Architecthttp://www.talend.com
>
>

Re: A bug in bundle states display..?

Posted by Christian Schneider <ch...@die-schneider.net>.
Looks like a bug. I think the current model for displaying state does 
not handle the case well where there are more than one 
/BundleStateService/ that applies to a given bundle.

Can you open an issue?

Christian

On 08.10.2014 10:13, Igor Raizin wrote:
> Hello!
>
> I gave a try to extend the bundle state in bundle:list command.
>
> I tried to implement the 
> /org.apache.karaf.bundle.core.BundleStateService/ in the same way as 
> /org.apache.karaf.bundle.core.internal.BlueprintListener/ provides 
> state for the blueprint.
>
> At the end I faced the issue...
> A bundle is in /Active /state, blueprint started successfully and my 
> /BundleStateService/ returns /Failure/ state -> the result state in 
> bundle:list is /Active, /but I expect to see /Failure/.
>
> In debug mode I saw in 
> /org.apache.karaf.bundle.core.internal.BundleServiceImpl#getInfo /the 
> /BlueprintListener /is the last in list to check the state and it 
> overrides the /Failure /state from my /BundleStateService/....
>
> Is this a bug or it was done on purpose?
> If the second than if there any other way to show the bundle state 
> /Failure /basing on some condition other than blueprint errors or OSGI 
> bundle state?
>
>
> Thanks for your help.
>
> WBR,
> Igor


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

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