Interactions between env and server values
server attribute value or an env attribute value but not
both. Thus:- The first version of the parameter contains a
serverattribute value only. - The second version of the parameter contains an
envattribute value only. - The third version of the parameter contains neither a
serverattribute value nor anenvattribute value.
- If the runtime
envvalue resolves to a value that the parameterenvattribute expressly specifies, PolicyCenter uses that version of the configuration parameter. - If the runtime
envvalue does not resolve to theenvvalue of a configuration parameter, PolicyCenter applies the first corresponding parameter setting in which the runtimeserverattribute resolves to a known value. - If neither of the two attributes resolves to known values, PolicyCenter applies the parameter setting corresponding to the
parameter with neither a
serverattribute value nor anenvattribute value.
<param name="BusinessDayStart" value="7:00 AM" env="test, test2, …" /><param name="BusinessDayStart" value="8:00 AM" server="#batch, ui" /><param name="BusinessDayStart" value="9:00 AM"/>
Keep these parameter definitions in mind as you consider the following examples.
Example 1
gwb runServer -Denv=test
In this case, PolicyCenter starts the application
server and sets the value of configuration parameter BusinessDayStart
to 7:00 a.m.
Example 2
gwb runServer -Denv=test -Dserver=#batch
In this case, PolicyCenter still sets
BusinessDayStart to the 7:00 a.m. value as the environment value is
the controlling factor.
Example 3
server
value only:-
gwb runServer -Dserver="#batch"
In this case, PolicyCenter sets
BusinessDayStart to the 8:00 a.m. value.
Example 4
Suppose that start the application server and set neither an env
value or a server role (server) value. In this case, PolicyCenter sets BusinessDayStart to the 9:00
a.m. value.
Example 5
env and
server attribute values. In such a case, PolicyCenter applies the corresponding parameter setting if both the
env and the server attributes resolve to known values.
For example, specify the BusinessDayStart parameter as follows:<param name="BusinessDayStart" value="9:00 AM" env="test" server="ui" /><param name="BusinessDayStart" value="8:00 AM" />
Consistent with this code, PolicyCenter sets
BusinessDayStart to 9:00 a.m. if env resolves to
test and server resolves to ui.
Otherwise, PolicyCenter sets
BusinessDayStart to 8:00 a.m.
server and env
attributes. The value or values of at least one of the attributes must
differ.For a list of configuration parameters, including information about which parameters can be set by environment, see Application configuration parameters.
See also
