5.3. Synchronous and Asynchronous Events

The service events are guaranteed to be delivered synchronously, whereas the framework and bundle events do not have such a guarantee. Figure 5.1 illustrates synchronous service event dispatching when a service is unregistered.

Figure 5.1. Synchronous service event dispatching. The shaded area is code belonging to the framework implementation.

Evidently, the framework waits for all listeners to complete their work before it proceeds with the service unregistration process. This is designed to give client bundles an opportunity to prepare for the consequences of registration, unregistration, or the property ...

Get Programming Open Service Gateways with Java Embedded Server™ Technology now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.