in our current osgi-project we'd like to enable third party developers to write their own bundles and register them as osgi-services. We'd like to let all traffic bypass a central bundle that checks authorisation, security, permissions...
Our first approach was to enforce those bundles to invoke a central service to invoke other services. That approach doesn't seem to work.
Is it possible to install a listener that gets all traffic sent between bundles and hence possibly enforce some actions?
Thx in advance, Thomas
Not really. However, you can use Service Hooks to enable a central bundle to observe all service registrations and hide them from all consumers. This central bundle could then register wrapper replacement services which the consumers would see instead. This would allow the central bundle to "intercept" all service calls.
This puts the central bundle is a god-like position making it impossible to easily dynamically be updated.