...
A profile can specify an <activation> element that can accept a list of properties that must all match values in the bootstrap environment to be activated(e.g. and) to activate the profile. This can be useful to localize an application based on the environment it is running in. For exampl,e the following profile could be automatically activated to set the discovery address to use when running in the prod environment based on the environment variable ENVIRONMENT_NAME=PROD being set in that environment.
Code Block | ||||
---|---|---|---|---|
| ||||
<model> <profiles> <profile name="PROD"> <activation> <properties> <ENVIRONMENT_NAME>PROD</ENVIRONMENT_NAME> </properties> </activation> <env> <nv.discovery.descriptor>solace://solace-prod-host:55555</nv.discovery.descriptor> </env> </profile> </profiles> </model> |
Profile Activation Order
Profiles are applied in the order in which they are specified in nv.ddl.profiles followed by any additional profiles activated by an activation element (which my be applied in any order). If the order of profile activation is important, the order attribute may be set on profiles to control the order in which they are applied:
- Profiles with a lower order are applied first.
- If the order attribute is not set it defaults to 0
- If two profiles have the same order value they are applied in the order they are specified in nv.ddl.profiles otherwise they are applied in an unspecified order after ordered profiles.
Troubleshooting DDL parsing
...