Sun Java System Message Queue 4.3 Administration Guide

ProcedureTo Set Up a JDBC-Based Data Store

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

    The relevant properties are discussed, with examples, in JDBC-Based Persistence Properties and listed in full in Table 16–6. In particular, you must specify a JDBC-based data store by setting the broker’s property to jdbc.

  2. Place a copy of, or a symbolic link to, your JDBC driver’s .jar file in the Message Queue external resource files directory, depending on your platform (see Appendix A, Platform-Specific Locations of Message Queue Data):

      Solaris: /usr/share/lib/imq/ext

      Linux: /opt/sun/mq/share/lib/ext

      AIX: IMQ_VARHOME/lib/ext

      Windows: IMQ_VARHOME\lib\ext

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

    cp  /opt/SUNWhadb/4/lib/hadbjdbc4.jar  /usr/share/lib/imq/ext

    The following command creates a symbolic link instead:

    ln  -s  /opt/SUNWhadb/4/lib/hadbjdbc4.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 the Database Manager utility resides, depending on your platform:

        Solaris: cd /usr/bin

        Linux: cd /opt/sun/mq/bin

        AIX: cd IMQ_HOME/bin

        Windows: cd IMQ_HOME\bin

    2. Enter the imqdbmgr command:

      imqdbmgr create all