Expand my Community achievements bar.

SOLVED

Configuration Management

Avatar

Level 1

Hi All,

I am trying to create  a configuration framework for my project.The Configuration are stored in node . Project consist of multiple environment example  Load, Test etc.. I require certain configuration to be read on activation of Bundle depending on the environment and not by instance its running ,I can get environment in Sling Servlet but Activator or Service level I am not sure how to achieve it 
 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi,

assign individual runmodes to the environments ("staging","integration", "production") and create a runmode-based configuration for the services.

kind regards,
Jörg

View solution in original post

2 Replies

Avatar

Level 10

You can add the configuration folder like config.test.author and put all your configuration under this folder.

start the instance with author, test

In the Activator or service, you can read the configuration properites using Properties API

Refer http://adobeaemclub.com/osgi-configuration-management-aem/

Avatar

Correct answer by
Employee Advisor

Hi,

assign individual runmodes to the environments ("staging","integration", "production") and create a runmode-based configuration for the services.

kind regards,
Jörg