Sun Java System Message Queue 3.7 UR1 Administration Guide

Configuring a JDBC-Based Store

To configure a broker to use JDBC-based persistence, you set JDBC-related properties in the broker’s instance configuration file and create the appropriate database schema. The Message Queue Database Manager utility (imqdbmgr) uses your JDBC driver and the broker configuration properties to create and manage the database. You can also use the Database Manager to delete corrupted tables from the database or if you want to use a different database as a data store. See Database Manager Utility for more information.

Note –

Example configurations for Oracle and PointBase database products are available. The location of these files is platform-dependent, and is listed under “Example applications and configurations” in the relevant tables of Appendix A, Platform-Specific Locations of Message QueueTM Data. In addition, examples for PointBase embedded version, PointBase server version, and Oracle are provided as commented-out values in the instance configuration file,

ProcedureTo Configure a JDBC-Based Data Store

  1. Set JDBC-related properties in the broker’s configuration file.

    The relevant properties are discussed under JDBC-Based Persistence and listed in Table 14–6. In particular, you must set the broker’s property to jdbc (see Persistence Properties).

  2. Place a copy of, or a symbolic link to, your JDBC driver’s .jar file in the following location:

    • On Solaris:

    • On Linux:

    • On Windows:


    For example, if you are using PointBase on a Solaris system, the following command copies the driver’s .jar file to the appropriate location:

    % cp j2eeSDKInstallDirectory/pointbase/lib/pointbase.jar /usr/share/lib/imq/ext

    The following command creates a symbolic link instead:

    % ln -s j2eeSDKID/lib/pointbase/pointbase.jar /usr/share/lib/imq/ext
  3. Create the database schema needed for Message Queue persistence.

    Use the imqdbmgr create all command (for an embedded database) or the imqdbmgr create tbl command (for an external database); see Database Manager Utility.

    1. Change to the directory where imqdbmgr resides:

      • On Solaris:

        cd /usr/bin
      • On Linux:

        cd /opt/sun/mq/bin
      • On Windows:

        cd IMQ_HOME\\bin
    2. Enter the imqdbmgr command:

      imqdbmgr create all

      Note –

      If you use an embedded database, it is best to create it under the following directory:

      /instances/ instanceName/dbstore/databaseName

      If an embedded database is not protected by a user name and password, it is probably protected by file system permissions. To ensure that the database is readable and writable by the broker, the user who runs the broker should be the same user who created the embedded database using the imqdbmgr command.