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.
Before you begin
  • Install the latest TIBCO Enterprise Messaging Server and start the server.
  • Download the latest DB2 server package from their official website and install DB2. Configure the server configuration by following the prompts in the DB2 Server Configuration wizard.
  • Download the latest 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.
  • 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 running 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 in BW_HOME\config (Windows) or ${BW_HOME}/config (Unix).
  4. Update the following properties for your environment:
    Property Name DB2 Value
    dbtypedb2
    dbdriver com.ibm.db2.jcc.DB2Driver
    dbconnectionurl jdbc:db2://localhost:50000/bwadmindb
    dbuserbwuser
    dbpasswordbwuser
  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.