Hi Team,
Can anyone help what would be perfect way to achieve this requirement:
We have number of OSGi services in our project and divided into 2 sets.
Based on a parameter passed during build, we need to enable one set of OSGi services and disable other set.
For Example:
We have OSGi service1, service2, service3, service4.
If param == enableFirstSet ----> then enable service1 & service2
If param == enableSecondSet ----> then enable service3 & service4
Also,
I have tried below code in activate method to deactivate individual services based on param but the problem is their attached OCD(configuration) still available in OSGi configuration tab as those configurations attached at bundle level rather than component level.
context.disableComponent((String) properties.get(Constants.SERVICE_PID));
Any pointer will be good.