Issue- AEM 6.4 Configurations not picking values from runmode config
All,
I am in the process of migrating code to 6.4 and i noticed that i see the configurations in config tab of felix console,it is also registered as a component, and i can edit and set values as well which persist, but persistence occurs at the system folder and not at config.local.author or config.local. Neither does it retrieve the values from the config.local.author folder for the configuration.
I did set up the run mode for the instance
Sample class
@Component(immediate = true,name="Service",service= Service.class, configurationPid="com.test.core.services.Service",property={
Constants.SERVICE_DESCRIPTION + "=Service",
Constants.SERVICE_VENDOR + "=Test"
}) // added configurationPid="com.test.core.services.Service" so that it reflects the configuration in the components tab for the component
//@Designate(ocd = Service.Config.class) // Commented this out to avoid duplicate configurations from appearing in felix console
public class Service {
private static String appID;
public String getAppID() {
return appID;
}
@ObjectClassDefinition(name = "Service config", pid="com.test.core.services.Service",description = "Description") // added PID for it to reflect in the felix console configuration
public @interface Config {
@AttributeDefinition(name = "App ID", description = "Description")
String getAppID();
@Activate
protected void activate(Config config) {
if (config != null) {
String appID = PropertiesUtil.toString(config.getAppID(), "");
}
}
}
