Hi,

I have written a couple of small OSGi apps where if a single top-level
DS component, let's call it T, cannot start then the application should
shut down immediately. One example are HTTP services where the HTTP
server port cannot be bound to.

The causes of failures I have seen are:
- T activation fails
- the bundle providing T fails to resolve
- a dependency of T fails activation
- a dependency of T cannot be provided because the bundle providing it
failed to staret

I can think of several ways of approaching the problem, but none of
them perfect:
- using the Felix Health Checks[1], that seems wrong since it's a
polling-based approach and we very likely know when a dependency fails
and stop immediately
- using the SCR introspection API [2], which is again based on polling
- waiting for the framework to start and then looking up the service;
but we don't know when the SCR has 'settled'

Are there any patterns or libraries that I can use to approach this
problem?

Thanks,
Robert

[1]:
https://felix.apache.org/documentation/subprojects/apache-felix-healthchecks.html
[2]: 
https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.component.html#service.component-introspection

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org

Reply via email to