Difference between revisions of "Overloading policies"
Jump to navigation
Jump to search
old>Admin (Created page with '== Overloading policies == # Ensure system values are not subject to change in the designer # Ease environment replication: Just copy the whole database, and define environmen…') |
m (17 revisions imported) |
||
(16 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
== Overloading policies == | == Overloading policies == | ||
The server policies can be hardcoded into the deployment file for various reasons | |||
# Ensure system values are not subject to change in the designer | # Ensure system values are not subject to change in the designer | ||
# Ease environment replication: Just copy the whole database, and define environmental differences in a file. | # Ease environment replication: Just copy the whole database, and define environmental differences in a file. | ||
=== Adding an overloaded policy === | === Adding an overloaded policy === | ||
Policy overloads are placed inside the Context element in the deployment file, where the connection strings are placed too. | |||
* Tomcat: <tomcat root>/conf/Catalina/localhost/<application>.xml | |||
* JBoss: <jboss root>/standalone/configuration/<application>.xml | |||
The policy in question should use the following syntax: | |||
<Parameter name="Policy.XXXXX" value="YYYYY"/> | |||
X = Name of the policy as per [[Policy_reference|Policy reference]] | |||
Y = Value of the policy in String, Integer or Boolean format | |||
=== Usage notes === | |||
* The Context parameters can optionally be set inside the servlet container manager | |||
* Changing overloaded policies inside the designer will have NO EFFECT at all | |||
* Please ensure the datatype fits Policy type, or the overloaded value will default to the installation value. | |||
** For boolean values use "true" or "false" | |||
** String value " should be escaped normally | |||
* Policy overloads are loaded ONCE when the application is loaded by the servlet container. | |||
** If you change the values, you will need to restart the application or the container | |||
** All parameters are written to the server / application logfile upon startup | |||
=== Example configuration === | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<Context path="/TempusServa" swallowOutput="true"> | |||
<Parameter name="Policy.applicationDisplayName" value="CustomerPortal"/> | |||
<Parameter name="Policy.doMainMenuAccordion" value="false"/> | |||
<Resource name="jdbc/TempusServaLive" auth="Container" type="javax.sql.DataSource" | |||
... | |||
</Context> | |||
=== Protecting the variables === | |||
By setting the special policy '''policyHideValues''', overloaded are no longer visible from backend system. | |||
== | <Parameter name="Policy.policyHideValues" value="true"/> |
Latest revision as of 11:55, 10 December 2021
Overloading policies
The server policies can be hardcoded into the deployment file for various reasons
- Ensure system values are not subject to change in the designer
- Ease environment replication: Just copy the whole database, and define environmental differences in a file.
Adding an overloaded policy
Policy overloads are placed inside the Context element in the deployment file, where the connection strings are placed too.
- Tomcat: <tomcat root>/conf/Catalina/localhost/<application>.xml
- JBoss: <jboss root>/standalone/configuration/<application>.xml
The policy in question should use the following syntax:
<Parameter name="Policy.XXXXX" value="YYYYY"/>
X = Name of the policy as per Policy reference
Y = Value of the policy in String, Integer or Boolean format
Usage notes
- The Context parameters can optionally be set inside the servlet container manager
- Changing overloaded policies inside the designer will have NO EFFECT at all
- Please ensure the datatype fits Policy type, or the overloaded value will default to the installation value.
- For boolean values use "true" or "false"
- String value " should be escaped normally
- Policy overloads are loaded ONCE when the application is loaded by the servlet container.
- If you change the values, you will need to restart the application or the container
- All parameters are written to the server / application logfile upon startup
Example configuration
<?xml version="1.0" encoding="UTF-8"?> <Context path="/TempusServa" swallowOutput="true"> <Parameter name="Policy.applicationDisplayName" value="CustomerPortal"/> <Parameter name="Policy.doMainMenuAccordion" value="false"/> <Resource name="jdbc/TempusServaLive" auth="Container" type="javax.sql.DataSource"
...
</Context>
Protecting the variables
By setting the special policy policyHideValues, overloaded are no longer visible from backend system.
<Parameter name="Policy.policyHideValues" value="true"/>