Configuring bwagent for MariaDB and TIBCO FTL®

The bwagent can be configured to use MariaDB database with TIBCO FTL for persistence and transport.

Note: The database name must be unique per agent network if multiple networks share the same physical database. bwagent and bwengine supports sharing the same database, users and schemas.

Prerequisites

  • Install TIBCO Enterprise Messaging Server 8.1 and start the server.
  • Download the MariaDB server package MariaDB_server_10.1 from https://downloads.mariadb.org/ and install MariaDB. Configure the server configuration by following the prompts in the MariaDB Server Configuration wizard. Ensure that you select the following values:
    • Database: Multifunctional
    • Type of connectivity: Manual
    • Default port: 3306
  • Download the following JAR files for MariaDB to the BW_HOME\config\drivers\shells\jdbc.mariadb.runtime\runtime\plugins\com.tibco.bw.jdbc.datasourcefactory.mariadb\lib folder:
  • Install the MariaDB driver by running the command bwinstall mariadb-driver from the /bin folder.
  • Ensure you have installed EMS client libraries. For more information, see "Integrating with TIBCO Enterprise Message Service™" 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 "Updating the Database Schema to Enable bwagent to Use Database with TIBCO Enterprise Message Service" in the TIBCO ActiveMatrix BusinessWorks™ Installation guide.

Procedure

  1. Create a database bwadmindb and grant privileges to the default database owner root as described in the following steps:
    1. Run the following command on the MariaDB terminal:
      mariadb>create database bwadmindb
    2. Run the following command to view the tables included in the newly created database:
      mariadb>use bwadmindb;
    3. Run the following command to grant all privileges to the root user for that database after replacing the value for the host IP address:
      mariadb>GRANT ALL PRIVILEGES ON *.* TO root@<host_IP> IDENTIFIED BY 'Tibco123'WITH GRANT OPTION;
      
      To grant the minimum amount of permissions to the bwuser for that database, run the following command, where <host_IP> is replaced with the value for the host IP address:
      grant create,select,update,insert,delete ON *.* to bwuser@<host_IP> IDENTIFIED BY "bwuser"; 
      
  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 MariaDB Value
    dbtype mariadb
    dbdriver org.mariadb.jdbc.Driver
    dbconnectionurl jdbc:mariadb://localhost:3306/bwadmindb
    dbuser bwuser
    dbpassword bwuser
  5. Run the bwadmin config command with the -cf option to create an .ini file in the correct location.
    BW_HOME\bin>bwadmin config -cf ../config/bwagent_db.json agent
  6. Restart the bwagent.