Perhaps the most typical change made to the standard ATG distribution is to modify Initial.properties
to start your own services when your application starts up. An Initial.properties
file might look something like this:
$class=atg.nucleus.InitialService
initialServices=\
servers/Initial,\
statistics/Sampler,\
sessiontracking/SessionManager,\
snmp/Initial
Suppose that you want your application to start a service called store/CatalogManager
when the application starts. You could modify the Initial.properties
file to add this service, but that change will be lost the next time you download a new ATG distribution.
Alternatively, you could override the Initial.properties
file by including your own copy in the localconfig
configuration directory. It might look something like this:
initialServices=\
servers/Initial,\
statistics/Sampler,\
sessiontracking/SessionManager,\
snmp/Initial,\
store/CatalogManager
The problem with this is that the next time you download an ATG distribution, the list of initial services may have changed, but your overriding properties file will shadow those changes.
What you really want to do is append your value to the end of the list included from the base configuration file. Nucleus allows you to do this by adding a +
character to the end of the property name. For example:
initialServices+=store/CatalogManager
Now when Nucleus reads the configuration, it first reads the initialServices
property from the first entry in your configuration path, config/config.jar
. Then it reads your value for initialServices
from the Initial.properties
file in the next directory in your configuration path, localconfig
. But instead of overriding the initialServices
from the config
directory, Nucleus appends the store/CatalogManager
to the end of the list found in the config
directory, adding the separating comma if necessary. This allows you to extend the list without having to replace it.
Note that the +
character must come right after the property name without any intervening white space, so the following example will not work:
initialServices += store/CatalogManager
When you work with the ATG Control Center Components editor, appending property values is handled for you, as long as you work in the proper configuration layer for the change you want to make. Configuration layers are discussed further in the next section.