Lifecycle Events and Handlers

Description

There should be a generic mechanism for handling lifecycle events of services. The following events should be covered:

  • creation/initialisation

  • activation

  • passivation

  • destruction

It's still to be discussed whether some of these event should have a pre and post handler (pre-activation and post-activation). Esp. with destruction, this may be very useful because in the current implementation, a service can't use another service during registry shutdown (e.g. for storing some state information to a DB).

It's also to be discussed whether these handlers should be specified using an interface, annotations or in module.xml, or any of them.

Environment

None

Status

Assignee

Raffael Herzog

Reporter

Raffael Herzog

Labels

None

Components

Affects versions

1.0

Priority

Major