Configuring bwagent for DB2 and TIBCO Enterprise Message Service

The bwagent can be configured to use DB2 database with TIBCO Enterprise Message Service (EMS) for persistence and transport.

Note: The database name must be unique per agent network if multiple networks share the same physical database.

Prerequisites

  • Install TIBCO Enterprise Messaging Server 8.1 and start the server.
  • Download the DB2 server package 10.5 from http://www-01.ibm.com/software/data/db2/linux-unix-windows/downloads.html and install DB2. Configure the server configuration by following the prompts in the DB2 Server Configuration wizard.
  • Download the following JDBC driver and connector JAR files for DB2 to the BW_HOME\config\drivers\shells\jdbc.db2.runtime\runtime\plugins\com.tibco.bw.jdbc.datasourcefactory.db2\lib folder:
    • db2jcc4.jar from http://www-01.ibm.com/support/docview.wss?uid=swg21363866.
  • Install the DB2 driver by running the command bwinstall db2-driver from the /bin folder.
  • Ensure you have installed EMS client libraries. For more information, see the "Integrating with TIBCO Enterprise Message Service™" section in the TIBCO ActiveMatrix BusinessWorks™ Installation guide.
  • Optional. If you are upgrading to ActiveMatrix BusinessWorks™ 6.3.2, or later versions of the software, upgrade the database schema. For more information, see the "Updating the Database Schema to Enable bwagent to Use Database with TIBCO Enterprise Message Service" section in the TIBCO ActiveMatrix BusinessWorks™ Installation guide.

Procedure

  1. Log in to DB2 and create database by executing the following command:
    CREATE DATABASE <database name> USING CODESET UTF-8 TERRITORY US COLLATE USING SYSTEM PAGESIZE 16384
    Note: Set the page size to 16K (16384) or higher.
  2. Stop the bwagent if it is running.
  3. Open the bwagent_db.json file located in BW_HOME\config (Windows) or ${BW_HOME}/config (Unix).
  4. Update the following properties for your environment:
    Property Name DB2 Value
    dbtype db2
    dbdriver com.ibm.db2.jcc.DB2Driver
    dbconnectionurl jdbc:db2://localhost:50000/bwadmindb
    dbuser bwuser
    dbpassword bwuser
  5. Run the bwadmin config command with the -cf option push the changes from the JSON file to the bwagent.ini file.
    BW_HOME\bin>bwadmin config -cf ../config/bwagent_db.json agent
  6. Restart the bwagent.