0
votes

If there are multiple sling configuration nodes with the same name in CRX and if I invoke configAdmin.getConfiguration in my OSGi Service, which config value would it pick? I have mulitple config directories under apps like config.qa, config.local, config etc. with have the same config node. How do I make CQ5 pick config.qa instead of config? I did add the property sling.run.mode=publish,qa in sling.properties file. It is still picking up the properties defined under config folder instead of config.qa. Why isn't it picking the props from the config.qa folder like the documentation at http://docs.adobe.com/docs/en/cq/5-4/deploying/configuring_osgi.html?

1

1 Answers

0
votes

It should always pick one with most match. For example if you have Run Mode as author,dev,intranet and then you have configs like config.author, config.dev, config.intranet and config.dev.intranet then in that case config.dev.intranet will be chosen. Make sure that you override your common config across this folder to make this work. Please check http://www.wemblog.com/2012/10/how-to-work-with-configurations-in-cq.html for more detail.

Yogesh