Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
import com.intellectdesign.canvas.config.ConfigurationException;
importcomimport com.intellectdesign.canvas.config.ConfigurationManager; 

...

Step 2: Trigger the initialize method

Code Block
languagejavajs
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
languagejavajs
ConfigurationManager configMgr = ConfigurationManager.getInstance();
configMgr.initializeFromBundle("MyImplementation"); 

...

Code Block
languagejava
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);
	}