...
Code Block |
---|
|
import com.intellectdesign.canvas.config.ConfigurationException;
importcomimport com.intellectdesign.canvas.config.ConfigurationManager; |
...
Step 2: Trigger the initialize method
Code Block |
---|
|
ConfigurationManager configMgr = ConfigurationManager.getInstance();
configMgr.initializeFromBundle("<PROPERTIES_FILE_NAME>"); |
...
Assuming that your CT configuration file name is MyImplementation.properties, the syntax to instantiate the bundle is as follows:
Code Block |
---|
|
ConfigurationManager configMgr = ConfigurationManager.getInstance();
configMgr.initializeFromBundle("MyImplementation"); |
...
Code Block |
---|
|
try
{
config= ConfigurationManager.getInstance();
config.initializeFromBundle("MyImplementation");
}
catch(ConfigurationException e)
{
LOGGER.error("Configuration system not initialized properly. Cannot service request.", e);
thrownewthrow new ServletException("Error while initializing configuration",e);
} |