There should be a generic mechanism for handling lifecycle events of services. The following events should be covered:
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.