In my OSGi applications I often make use of the OSGi extender pattern. An excellent example is available on Kai's Toedter blog.
As Peter Kriens explained:
In the Synchronous Bundle Listener event call back, the subsystem can
look at the resources of the bundle and check if there is anything of
its...