Apama 10.15.0 | Developing Apama Applications | Developing Apama Applications in EPL | Using EPL Plug-ins | Using the distributed MemoryStore | Changing bean property values when deploying projects
 
Changing bean property values when deploying projects
Some bean property values will usually need to be changed when a development/testing configuration is deployed to a different environment such as production, which is typically achieved by ensuring that all such bean property values are specified using ${varname} substitution variables specified in .properties files for test versus production environments. For example, for some distributed memory stores the clusterName should be changed so that the nodes cannot talk to each other (although Apama also recommends production nodes to be located on a different network to reduce the chance of accidental errors). For more details on using substitution variables to specify configuration properties, see Substitution variables.
Tip: 
Due to the flexibility and simplicity of .properties files, there are many ways this requirement can be addressed. For customers using Apama's Ant macros for deployment, one option is to maintain a separate set of .properties files for each environment, and customize your project's Ant script to copy the correct version of the files into the directory defined by the --distMemStoreConfig option just before starting the correlator. Another option is to use Ant's <propertyfile> task (see the Apache Ant documentation for more information on how to do this) to modify the .properties files in-place, overriding or adding to existing property values as required for the new deployment.