Configuration Service
Capital markets applications commonly need to manage collections of configuration data and preserve it across restarts. The CMF Configuration Service provides the functionality to persist, modify, and retrieve configuration data. CMF components such as the Risk Firewall and Position Service use the Configuration Service to maintain their state across application restarts.
The Configuration Service manages configuration stores, collections of tables with application-defined schemas, which are persisted to and loaded from a backing store. A single application can have multiple backing store implementations and each implementation can use a different backing store. The Configuration Store bundle includes a backing store implementation that persists data using Apama MemoryStore. The Configuration Service sample in the \ASB\Samples\ folder illustrates how to use it.
Backing memory stores implement the ConfigurationStoreInterface object. Typically, they use the current CMF memory store interface MemoryStoreConfigurationStore object. An application must open a configuration store to load the data into memory. A set of in-memory tables make the data available to the application. The com.apama.config.ConfigurationTableInterface object provides access to the data in these tables. Applications should use the ConfigurationTableInterface object when updating configuration tables to ensure that updates are persisted to the underlying backing store. In addition, use of the Apama MemoryStore to cache the configuration table data simplifies creation of dashboards because DataViews are automatically generated for each table.
To use a backing store for persisting configuration information, an application must first perform the following:
Add the Configuration Store bundle.
Initialize the Configuration Service.
Create a backing store and specify the schema (during creation) or find an existing backing store.
After these initial steps, the application can add, modify, and retrieve configuration data.