You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by "Cornelius, Martin (DWBI)" <Ma...@smiths-heimann.com> on 2009/02/18 10:05:18 UTC

Bundle restarted when startlevel is changed to same level -> bug ?

Hi there,

i just observed a behaviour in felix-1.4.1 that looks like a contradiction to the OSGi spec to me:

I have a bundle installed, that has set it's bundlelevel to 2, and always throws an execption in the BundleActivator.start() method.

If i am in startlevel 1, and issue the shell-command 'startlevel 2', the framework tries to start the bundle and logs an ERROR, as expected.

However, if i now (being already in startlevel 2) repeat the command  'startlevel 2', the framework again tries to start the bundle and repeatedly logs an ERROR. IMHO, this looks like a contradiction to the spec, which states in §8.2.2 : 
If the requested start level is the active start level, the Framework will not start or stop any bundles.

Thanks in advance for any comments, 

Martin


 
************************************************
The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege.  If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager.  Please do not copy it for any purpose, or disclose its contents to any other person.  The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company.  The recipient should check this e-mail and any attachments for the presence of viruses.  The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.
************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


RE: Bundle restarted when startlevel is changed to same level -> bug ?

Posted by "Cornelius, Martin (DWBI)" <Ma...@smiths-heimann.com>.
I have created a JIRA issue and attached a small patch that fixes the problem.

cheers, Martin


> -----Ursprüngliche Nachricht-----
> Von: Stuart McCulloch [mailto:mcculls@gmail.com]
> Gesendet: Mittwoch, 18. Februar 2009 10:47
> An: users@felix.apache.org
> Betreff: Re: Bundle restarted when startlevel is changed to same level ->
> bug ?
> 
> 2009/2/18 Cornelius, Martin (DWBI) <Ma...@smiths-heimann.com>
> 
> >
> > Hi there,
> >
> > i just observed a behaviour in felix-1.4.1 that looks like a
> contradiction
> > to the OSGi spec to me:
> >
> > I have a bundle installed, that has set it's bundlelevel to 2, and
> always
> > throws an execption in the BundleActivator.start() method.
> >
> > If i am in startlevel 1, and issue the shell-command 'startlevel 2', the
> > framework tries to start the bundle and logs an ERROR, as expected.
> >
> > However, if i now (being already in startlevel 2) repeat the command
> >  'startlevel 2', the framework again tries to start the bundle and
> > repeatedly logs an ERROR. IMHO, this looks like a contradiction to the
> spec,
> > which states in §8.2.2 :
> > If the requested start level is the active start level, the Framework
> will
> > not start or stop any bundles.
> >
> 
> yes, this looks like a bug - could you raise an issue on JIRA (along with
> a
> patch if you like ;)
> 
> 
> > Thanks in advance for any comments,
> >
> > Martin
> >
> >
> >
> > ************************************************
> > The information contained in, or attached to, this e-mail, may contain
> > confidential information and is intended solely for the use of the
> > individual or entity to whom they are addressed and may be subject to
> legal
> > privilege.  If you have received this e-mail in error you should notify
> the
> > sender immediately by reply e-mail, delete the message from your system
> and
> > notify your system manager.  Please do not copy it for any purpose, or
> > disclose its contents to any other person.  The views or opinions
> presented
> > in this e-mail are solely those of the author and do not necessarily
> > represent those of the company.  The recipient should check this e-mail
> and
> > any attachments for the presence of viruses.  The company accepts no
> > liability for any damage caused, directly or indirectly, by any virus
> > transmitted in this email.
> > ************************************************
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > For additional commands, e-mail: users-help@felix.apache.org
> >
> >
> 
> 
> --
> Cheers, Stuart
> 
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________

 
************************************************
The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege.  If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager.  Please do not copy it for any purpose, or disclose its contents to any other person.  The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company.  The recipient should check this e-mail and any attachments for the presence of viruses.  The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.
************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Bundle restarted when startlevel is changed to same level -> bug ?

Posted by Stuart McCulloch <mc...@gmail.com>.
2009/2/18 Cornelius, Martin (DWBI) <Ma...@smiths-heimann.com>

>
> Hi there,
>
> i just observed a behaviour in felix-1.4.1 that looks like a contradiction
> to the OSGi spec to me:
>
> I have a bundle installed, that has set it's bundlelevel to 2, and always
> throws an execption in the BundleActivator.start() method.
>
> If i am in startlevel 1, and issue the shell-command 'startlevel 2', the
> framework tries to start the bundle and logs an ERROR, as expected.
>
> However, if i now (being already in startlevel 2) repeat the command
>  'startlevel 2', the framework again tries to start the bundle and
> repeatedly logs an ERROR. IMHO, this looks like a contradiction to the spec,
> which states in §8.2.2 :
> If the requested start level is the active start level, the Framework will
> not start or stop any bundles.
>

yes, this looks like a bug - could you raise an issue on JIRA (along with a
patch if you like ;)


> Thanks in advance for any comments,
>
> Martin
>
>
>
> ************************************************
> The information contained in, or attached to, this e-mail, may contain
> confidential information and is intended solely for the use of the
> individual or entity to whom they are addressed and may be subject to legal
> privilege.  If you have received this e-mail in error you should notify the
> sender immediately by reply e-mail, delete the message from your system and
> notify your system manager.  Please do not copy it for any purpose, or
> disclose its contents to any other person.  The views or opinions presented
> in this e-mail are solely those of the author and do not necessarily
> represent those of the company.  The recipient should check this e-mail and
> any attachments for the presence of viruses.  The company accepts no
> liability for any damage caused, directly or indirectly, by any virus
> transmitted in this email.
> ************************************************
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
Cheers, Stuart