Currently extensions are tied to the resolution state of the bundle (not
the active state).  See bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=210104 for an enhancement
request to tie extension registry contributions to the active lifecycle of
the bundle.

Tom




                                                                       
  From:       André Hildebrandt <mys...@andrejagusch.de>             
                                                                       
  To:         Equinox development mailing list <equinox-dev@eclipse.org>
                                                                       
  Date:       03/25/2009 01:56 PM                                      
                                                                       
  Subject:    Re: [equinox-dev] Bundle with Extension can be invoked in 
RESOLVED      state
                                                                       





What is the reason for this behaviour? I can workaround my problem by
extending my extension point interface and making the extensions
evaluate the Bundle.getState() to check if the bundle is active. But
to me this behaviour seems somewhat unintuitive, and I would have
thought that this is taken care of by the framework.

Best Regards,

André


On Mar 25, 2009, at 7:22 PM, Raval, Parag wrote:

>
> Yes. I think you can still access the Bundle and its classes but can
> not access the BundleContext or interact with the OSGi framework, if
> the Bundle is not in the ACTIVE state.
>
> Regards,
> Parag
>
> -----Original Message-----
> From: equinox-dev-boun...@eclipse.org [
mailto:equinox-dev-boun...@eclipse.org
> ] On Behalf Of André Hildebrandt
> Sent: Wednesday, March 25, 2009 11:08 AM
> To: equinox-dev@eclipse.org
> Subject: [equinox-dev] Bundle with Extension can be invoked in
> RESOLVED state
>
> Hi,
>
> I hope I have not totally missed the point, but I have a bundle,
> let's call it B, that contains an extension for an extension point
> defined in bundle A. When I invoke a servlet in bundle A the
> extensions for the extension point are read out and the extension
> implementations are instantiated. A method getName() is called on
> the instances to provide a list of the available extensions. This
> works fine. However if in the osgi console I enter "stop B" and
> invoke my servlet in bundle A, it still can (and does) access the
> extension implementation in B. I have verified the state of B by
> typing "ss" in the osgi console and I'm told its in the RESOLVED
> state. I can make my scenario work by executing "uninstall B", but
> am surprised that stop is not enought. I read the javadoc about what
> RESOLVED means, but somehow this did not IMO clearly state if a
> bundle in RESOLVED state can be accessed.
> Should a bundle that has been stopped still be accessible?
>
> Best Regards,
>
> André_______________________________________________
> equinox-dev mailing list
> equinox-dev@eclipse.org
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@eclipse.org
> https://dev.eclipse.org/mailman/listinfo/equinox-dev

_______________________________________________
equinox-dev mailing list
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev

<<inline: graycol.gif>>

<<inline: ecblank.gif>>

_______________________________________________
equinox-dev mailing list
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Reply via email to