The OSGi environment supports the functionality to install and uninstall bundles (plugins) during runtime. In some cases those bundles may contain domain classes which are to be indexed by Compass. It would be great to have functionality to add classes to compass mapping during runtime.
Example use case could look like this:
The osgi env starts up, the Compass bundle has no knowledge of any class that it should index. Compass exposes some service that allows adding classes to its configuration, searching and storing in index (mainly Compass interface).
When other bundles with domain classes start they register each class in Compass and from this point Compass can index them. When the are uninstalled they unregister the classes and Compass forgets about them.
I've managed to do something like this by extending LocalCompassBean and some tricks with InternalCompass interface. I have a list of registered classes and when any method from InternalCompass is called I check if any class was added or removed to the config and rebuild Compass if needed. I'm sure You could do this on much lower level and more integrated. I can provide You with some code if needed.
I'm sure such a functionality would be a great asset to Compass and would make it more commonly used especially in newly created software.
Maybe you can attach an example of what you did, and we can move forward from there?