Service module configuration

Configuration data for BOD service modules is organized into base, and custom configuration. Configuration files are loaded before the service module can process service requests. The configuration class loader automatically discovers the configuration directories, by following certain naming conventions.

Base (or bootstrap) configuration enables basic service module functionality. It contains the configuration data provided with the WebSphere Commerce service modules. You can also create custom configuration to add new functionality or customize existing functions. To change or extend this configuration, you must place you configuration in the WC_eardir\xml\config\servicemodulename-ext\ directory with the configuration files named as the same as those you want to change or extend.
Note: Whether the configuration overwrites the default configuration or extends it depends on the function that uses that configuration.

Configuration file loading

When resolving configuration, custom configuration always takes precedence over base configuration. Depending on the load policy (extend versus override), the base configuration is either parsed or skipped. The load policy is specified in the parser class implementation. You can check whether the policy is overridable by calling the isOverridable() method.

For more complex configuration data structures, that cannot easily be represented as name-value pairs (for example, heavily structured, nested data), you can provide your own configuration file and configuration parser. This requires more work from the developer, but is completely flexible - any kind of configuration file can be read, parsed, and retrieved in your service module Java code. If you are writing your own configuration parser, must extend from the AbstractConfigurationImpl abstract class.

Extend Policy
When the extend policy is used, the configuration information for both bootstrap and custom configuration is loaded and returned to the caller as a list of configuration objects. In the list, custom configuration precedes bootstrap configuration. The caller must traverse the list and pick the configuration.
Override Policy
If the override policy is used, the loading process only loads the custom configuration. The bootstrap configuration is ignored. Thus, any metadata placed in custom configuration files will completely override the metadata from the base.

During development, you may want to modify and reload configuration, without having to restart the server. To enable volatile reloading for all service modules, create an empty .reloadconfig file in xml/config/ This will cause every service module to check the timestamps on its configuration files, each time it is called. Configuration files that have changed from the time that they were last loaded will get re-parsed. Also, if a configuration file was added or removed, all files in the same directory are reloaded. To enable volatile reloading for a particular service module, create an empty .reloadconfig file under the service module configuration directory . For example, xml/config/com.myco.myservicemodule. Volatile reloading will only be enabled for that service module.

Naming conventions

The configuration loader uses directory names to discover a service module's bootstrap and custom configurations.

Bootstrap configuration
Custom configuration
In both cases above, servicemodulename represents the name of your service module or the WebSphere Commerce service module you are configuring.
Configuration filenames follow a strict naming convention – these names are used by the configuration loader.
  • All WebSphere Commerce default configuration filenames are prefixed by "wc-". For example: wc-query.tpl.
  • Administration configuration filenames begin with "wc-admin".
  • Descriptive words are joined with dashes. For example, wc-business-context.
Every service module contains the following files:
Contains the development configuration of a component. It can occur in both the base and custom configuration directories.
Contains the administration configuration of a component. It can occur in both the base and custom configuration directories.
Contains the development configuration information applicable to all components within an application. This file will only exist under the foundation component directory.
Contains the administration configuration information applicable to all components within an application. This file will only exist under the foundation component directory.
Used for loading the initialized logical SDO classes. Specifies a class that declares the logical SDO classes that need to be initialized. For example, the file for the Member component contains:
Specifies the bindings from URL to Web services. For example, the component-client.xml for the Member service module is shown in the following XML sample:
<_config:DevelopmentClientConfiguration xmlns:_config="" xmlns:xsi="" xsi:schemaLocation=" ../xsd/wc-component-client.xsd">
		<_config:invocationbinding bindingImpl="">
			<_config:property name="url" value="http://hostname:8007/webapp/wcs/component/member/services/MemberServices"/>
Contains configuration information for the Business Object Mediator.
Contains Object-relational metadata.
Note: The configuration files are guided by an XSD (XML Schema Definition). The XSD provides documentation describing the purpose of each configuration file. The XSD is located in the xml/config/xsd directory. By observing the XML file in an editor, you can use the XSD to determine the respective supported elements, as well as the annotation about the configuration.

Configuration files

The following configuration files are typically used for BOD-based services:
  • wc-admin-component
  • wc-business-context
  • wc-business-object-mediator.xml
  • wc-component.xml
  • wc-component-client.xml
  • wc-object-relational-metadata.xml
  • wc-query-noun-get.tpl
  • wc-query-noun-update.tpl
The following configuration files are typically used for SOI-based services:
  • wc-component.xml
  • wc-component-client.xml