Nucleus can configure a component from properties that are set in multiple configuration directories. If configuration files in multiple directories set the same property, Nucleus can resolve this in two ways:

Override Property Settings

You can override the settings in any properties file from another properties file that has higher precedence. For example, any settings in a module’s base configuration can be overridden by a properties file of the same name in the application’s localconfig directory.

Combine Multi-Value Property Settings

You can concatenate settings from multiple files for a given multi-value property (such as an array or list) by using the += operator, as follows:

property-name+=property-setting[property-setting]...

Note: No white space should precede or follow the += operator.

This can be especially useful when you need to supplement existing settings that are supplied by the base configuration of an Oracle Commerce Platform module. For example, the standard Oracle Commerce Platform distribution provides the base Initial.properties, which starts a number of services:

$class=atg.nucleus.InitialService
initialServices=\
     servers/Initial,\
     statistics/Sampler,\
     sessiontracking/SessionManager,\
     snmp/Initial

It is likely that your application also starts its own set of services. Because installation of any later Oracle Commerce Platform distribution always overwrites the base Initial.properties, you should not modify this file so it includes application-specific services. You also should not override it with another copy of Initial.properties elsewhere in the configuration path—for example, in localconfig. If the next Oracle Commerce Platform distribution changes the installed list of initial services, those changes are shadowed by the localconfig version of Initial.properties.

Instead, you can concatenate settings for the initialServices property from the base and localconfig versions of Initial.properties. For example, you might modify localconfig/Initial.properties as follows:

initialServices+=store/CatalogManager

Given the previous settings in the base Initial.properties, this yields the following settings for initialServices:

servers/Initial
statistics/Sampler
sessiontracking/SessionManager
snmp/Initial
store/CatalogManager

By using the += operator, the store/CatalogManager entry is appended to the list of services already set by the base version of Initial.properties. When Nucleus reads the configuration path, it finds two Initial.properties files in /config/config.jar and /localconfig, and combines initialServices settings from both files. If product updates change the base version’s set of services, the /localconfig setting is appended to the new set.


Copyright © 1997, 2015 Oracle and/or its affiliates. All rights reserved. Legal Notices