I have registered a ConfigurationPlugin object in Bundle A to process and modify existing properties of configuration before they reach the Managed Service. Bundle A has no dependencies on other Bundles in the project as its sole purpose is to support ConfigAdmin.
https://docs.osgi.org/javadoc/r4v42/org/osgi/service/cm/ConfigurationPlugin.html
The problem here is that due to the OSGI nature of dynamics, another Bundle B as well as Configurator and ConfigAdmin starting very early, just before Bundle A, causing no plugin service being available to process its Configurations.
I want to ensure that plugin is known to the ConfigAdmin before any Configuration gets applied.
It seems there is a solution by passing framework property named "felix.cm.config.plugins" with the config plugin id. However, I'm not sure how to pass or set the framework properties. I tried passing my ConfigurationPlugin through System Properties but it didn't seem to work.
java -jar aem-author-p4502.jar -Dsling.run.modes=author,local -Dfelix.cm.config.plugins=CustomConfigPluginPId
Any help to either set framework property correctly or prioritize starting Bundle A would be much appreciated.
Thanks.