Merging Event Files

Both event definition and handler registration files are located in the /events directory of a component. The Cúram reference application is shipped with a set of event files. These may be augmented by placing new event files in the SERVER_DIR/components/<custom>/events directory, where <custom> is any new directory created under components that conforms to the same directory structure as components/core. This mechanism avoids the need to make changes directly to the out-of-the-box application, which would complicate later upgrades.

The override process involves merging all event files of the same name according to a precedence order. The order is based on the SERVER_COMPONENT_ORDER environment variable. This environment variable contains a comma-separated list of component names: the left most has the highest priority, and the right most the lowest.

After changing the component precedence order in SERVER_COMPONENT_ORDER it is necessary to perform a clean build to ensure that you are using the appropriate files. This is done by invoking build clean server.