On assembly, an application’s configuration path is set to one or more configuration directories. These directories are set from the Configuration Path Attributes in module manifest files. Precedence of configuration path directories determines how component properties are set, and is generally determined by two factors:
Configuration Path Attributes
On application assembly, each module adds to the configuration path the directories that are set in the module’s manifest file. Each configuration path attribute can set one or more directories in the following format, where spaces delimit multiple directories, and directory paths are relative to the module’s root directory:
config
-path-attr
:
config-
dir
[
config-
dir
]...
For example, the DAS module manifest <ATG11dir>/DAS/META-INF/MANIFEST.MF
sets the attribute ATG-Config-Path
as follows:
ATG-Config-Path: config/config.jar
On application assembly, the directory’s absolute pathname is added to the configuration path as follows:
<ATG11dir>/DAS/config/config.jar
The following table lists the configuration path attributes that a module’s manifest file can set:
Attribute | Specifies Directories of.... |
---|---|
| Configuration files that are required by module application components. |
| Configuration files that are associated with the Named Configuration For example, the following configuration path attribute is used and its directories are added to the configuration path when the application is assembled with the switch
|
| Configuration files that are specific to the third-party application server specified by |
| Platform-specific configuration files that are associated with the Named Configuration For example, the following configuration path attribute is used and its directories are added to the configuration path when the application runs on JBoss, and the application is assembled with the
|
| Module resources that provide Nucleus configuration files. The specified directories are added to the configuration path when the |
| Platform-specific configuration files. The specified directories are added to the configuration path when two conditions are true: the application runs on the platform specified by |
Precedence of Configuration Path Attributes
The directories specified by the configuration path attributes of each module are appended to the configuration path in the following order (left-to-right), where the left-most path (set by ATG-Config-Path
) has lowest precedence:
ATG-Config-Path
ATG-
cfgName
Config-Path
ATG-
platform
Config-Path
ATG-
app-svrCfgName
Config-Path
ATG-3rdPartyConfig-Path
ATG-LiveConfig-Path
ATG-
platform
LiveConfig-Path
Module List Order and Dependencies
The previous section describes how the configuration path is set from a single module. Because an Oracle Commerce Platform application is assembled from multiple modules, the assembly process must determine precedence among them when it orders their respective configuration directories in the configuration path. These modules include application modules that are explicitly specified in the assembly module list, and Oracle Commerce Platform modules such as DAS and DSS. Together, these comprise the expanded module list, and the assembly process must resolve dependencies among them when it creates the configuration path.
The ordering of directories from various modules in the configuration path is generally determined by two factors:
The order of the module list that is explicitly supplied for application assembly
Dependencies among modules within the expanded module list
Unless inter-module dependencies mandate otherwise, Nucleus sets module configuration directories in the configuration path in the same order as the module list. For example, a startup script might be supplied the following module list:
-m foo bar
In this case, you can generally expect that the configuration directories specified by module foo
are set in the configuration path before those in module bar
. Thus, given overlapping component properties, settings in bar
have precedence over those in foo
. However, if foo
is directly or indirectly dependent on bar
, their order in the configuration path is reversed to reflect this dependency. In that case, bar
precedes foo
, so foo
settings have precedence.
The Oracle Commerce Platform modules in the expanded module list might also have dependencies; these are resolved during application assembly, before the configuration path is created. Dependencies are not always obvious; you can view their resolution during application startup, when Nucleus outputs the application’s configuration path.