Develop > Business logic layer > Developing the business logic layer using the BOD command framework > Work with WebSphere Commerce service modules
Configure a BOD service module
Configuration files get loaded when their component is first called. The class loader automatically discovers the configuration directories, by following the naming conventions. When resolving configurations, custom configuration always takes precedence over the base configuration. At runtime, command developers can retrieve the configuration information by using the ComponentConfigurationRegistry Java class, which retrieves the class responsible for parsing and providing an interface to retrieve the information. There are two ways add configuration data to a service module. The first way is to extend the default WebSphere Commerce configuration XSD. This allows you to quickly add name-value pairs to the configuration data of an existing component. The second way is to define the own configuration file structure, and provide the own configuration file parser. This approach, while more complex, is quite flexible – everything from the structure of the configuration file itself to the implementation of the parser, can be changed.
- Extend the configuration of a service module to add name-value parameters
The simplest way to quickly add configuration data to a BOD service module is to extend the default WebSphere Commerce configuration file. No parser code needs to be written, you just need to provide the parameters in an XML file, and then retrieve them in the Java code.
- Add a custom configuration to a BOD service module
For more complex configuration data structures, that cannot be represented as name-value pairs (for example, heavily structured, nested data), you can provide the 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 the service module Java code.
- Reload the configuration of a BOD service module
During development, you may want to modify and reload configuration, without having to restart the server. This is supported through the use of a .reloadconfig file.