[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] framework shutdown and bundle listeners

Synchronous bundle listeners are notified synchronous so they will
receive the events of all the bundles that are stopped before they are
stopped and their own.

With async bundle listeners it is not defined because the event
delivery is async from the actual event. Events must not be delivered
to bundles that are stopped.

Does this help?

Kind regards,

     Peter Kriens

RC> Reading the OSGi spec, the semantics of what happens w.r.t. events when 
RC> shutting down the framework (e.g. with "stop 0") are not clear:

RC> According to section 4.19.2, when shutting down the framework, these 
RC> actions occur:

RC> "1. The system bundle enters the STOPPING state.

RC> 2. All ACTIVE bundles are suspended as described in the Bundle.stop
RC> method (...).

RC> 3. Event handling is disabled."

RC> Will synchronous BundleListeners be notified during step 2 (before the 
RC> framework is shut down)? Can I assume that asynchronous bundle listeners 
RC> will never have a chance to be notified because of step 3?

RC> Thanks for any comments,

RC> Rafael

Peter Kriens                              Mob. +46705950899