Parag is correct.

Stopping a bundle runs the BundleActivator.stop method for the bundle and
invalidates the BundleContext for the bundle but it does not throw away the
class loader or make the bundle unaccessible to the rest of the framework.

Tom




                                                                       
  From:       "Raval, Parag" <[email protected]>                         
                                                                       
  To:         "Equinox development mailing list" <[email protected]>
                                                                       
  Date:       03/25/2009 01:23 PM                                      
                                                                       
  Subject:    RE: [equinox-dev] Bundle with Extension can be invoked in 
RESOLVED      state
                                                                       






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: [email protected] [?
mailto:[email protected]] On Behalf Of André Hildebrandt
Sent: Wednesday, March 25, 2009 11:08 AM
To: [email protected]
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
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev
_______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev

<<inline: graycol.gif>>

<<inline: ecblank.gif>>

_______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Reply via email to