8.2 Activating the Reaction OSGi Service

Within any given OSGi based application, the Reaction service should generally be treated as an infrastructure component. This means that it should be started prior to application startup and remain active throughout a given application session. This assumption makes application development much more straightforward, since the application components can then assume that the Reaction service is always available in normal operation. Application components will still need to track the Reaction service, but loss of the Reaction service can then be treated as a fatal error and application recovery is not required.

The standard way of enforcing this activation order is to make use of the OSGi framework's start level service, or the new start level API. Typically, the OSGi framework startup process should ensure that the following activation order is observed:

  1. The standard OSGi framework service will always be started first.

  2. The standard OSGi log service should be started to provide the basic logging functionality.

  3. Any required backend logging services should be started and attached to the OSGi log service.

  4. The Reaction service should be started and will automatically attach to the existing OSGi log service.

  5. The core application components may be started.

  6. Additional application plugins can be installed, started, stopped and uninstalled as required.