Configuring Database Stores

This section describes the steps required to configure and deploy database stores.

For general conceptual information about the multiple store feature, see Store Messages in Multiple Stores.

Settings for creating and configuring database stores are managed in the EMS server, and are transparent to clients. To configure the database stores feature, follow these steps:

Procedure

  1. Enable the database store feature in the tibemsd.conf by setting the parameters:
    • dbstore_classpath  
    • dbstore_driver_name  
    • dbstore_driver_dialect  
    • jre_library
    For detailed information about the dbstore parameters, see Configuration in tibemsd.conf. The jre_library parameter, which enables the JVM in the EMS server, is described in JVM Parameters.
  2. Setup and configure stores in the stores.conf file.

    You can create multiple database stores, or a combination of database and file-based stores. Each store must have a unique name. Parameters determine whether the store is a database store, provide the location of the database server, and specify the username and password that the EMS server uses to access the database.

    For a list of database store parameters, see Configuration in stores.conf below.

  3. Associate destinations with the configured stores.

    Messages are sent to different stores according to their destinations. You associate a destination with a specific store using the store parameter in the topics.conf and queues.conf files. You can also change store associations using the setprop topic or setprop queue command in the EMS Administration Tool.

    Multiple destinations can be mapped to the same store, either explicitly or using wildcards. Even if no stores are configured, the server sends persistent messages that are not associated with a store to default stores. See Default Store Files for more information.

    For details about the store parameter, see store.

  4. Export database tables.

    When the EMS server is configured to store messages in a database, the database schema must be exported before the server is started. Use the EMS Schema Export Tool to create, drop, and update the database tables.

    For details, see EMS Schema Export Tool.