As part of the server-instance-type
and server-instance
elements, you can specify properties files to create and configure. If you configure properties files in the server-instance-type
element, every server instance of that type uses the same properties file. If the property file is in the server-instance
element, each instance can have unique configuration.
Property files are specified in the config-directory
element of a particular server instance or instance type, as shown in this example:
<product id="blueprint" extends="commerce"> ... <server-instance id="basic_management" type="management"> ... <config-directory> <!--Property file declarations here -->
The server-instance-type
element supports an additional optional-config-directory
element. This element cannot be used in a server-instance element. It appears as a separate option in the server instance configuration user interface. For example:
<server-instance-type id="id
">
<title>Title</title>
<config-directory>
<property-file>
…
</property-file>
</config-directory>
<optional-config-directory id="some-option">
<title>Configure these optional properties</title>
<detail></detail>
<property-file>
…
</property-file>
</optional-config-directory>
</server-instance-type>
A property file is defined by a file name and a list of properties. The file name is relative to the path <ATG11dir>/home/servers/
server_name
/localconfig
, and should start with a slash, as shown in the value
element of this example:
<property-file file="atg/dynamo/service/jdbc/JTDataSource.properties"> <property-group id="base"> <property name="dataSource"> <value>/atg/dynamo/service/jdbc/DirectJTDataSource</value> </property> </property-group> </property-file>
You can specify multiple property files. You can also group properties, so that the current product selection acts to filter subsets of the total property list.
In order for a property group to be included in a server instance, all of the requires-addon-id
identifiers listed in the property group must be included in the current product selection. If no add-ons are listed, the property group applies to all product selections. A property-file
element can include multiple property-group
elements, but each property-group must have a unique ID.
In addition to requiring add-ons, you can use the pass-validation
tag to specify a validator to test for other conditions. As with the requires-addon-id
tag, all specified validators must pass in order for to execute the property group. The following example uses pass-validation
to add properties if the database is DB2:
<property-file file="GLOBAL.properties"> <property-group id="db2"> <pass-validation id="HasDB2DatasourceValidator" class="atg.cim.worker.databaseconfig.HasDB2DatasourceValidator"/> <property name="handleRangesInMemory"> <value>true</value> </property> <property name="localTransactionModeInitialization"> <value>false</value> </property> </property-group> </property-file>
You can pass properties to the validator as shown in the following example:
<pass-validation id=" DirectoryExistsValidator " class="atg.cim.worker.common.DirectoryExistsValidator"> <property name="absPath"> <value>C:\ATG\</value> </property> </pass-validation>
Values can be replaced dynamically just as they are with properties files (see Using Dynamic Values in Properties Files).