We run our application in a Equinox OSGi runtime. There is an extension mechanisms in place that are used alongside OSGi itself to load plugins from 2nd/3rd parties. The problem is that those plugins can introduce packages that interfere with the "core" application or with other plugins.
That is why I'm experimenting with Aries Subsystem 2.0.10 to introduce some bundle scoping into the mix and avoid interference with the "core" application and the other plugins as well, also allowing plugins devs to use versions of common libs (e.g. Spring) that they desire.
Currently I generate an ESA from the set of plugin bundles and install the subsystem of type Application in the OSGi framework. The problem starts when starting the subsystem, our extension mechanisms (inside the kernel region) depend on BundleEvents being fired for the set of starting bundles inside the subsystem, but the subsystem is deployed in its own Region, thus the bundle events get filtered, and never reach the listeners in the kernel region.
Is there a way to receive the BundleEvents from the subsystem's region in the kernel region, without using a "artificial" bundle inside the subsystem that retransmits said events on some global event bus?