2.3. Installing Red Hat JBoss BRMS on Red Hat JBoss Web Server

The generic deployable package is provided for customers to install Red Hat JBoss BRMS 6.2 to an existing application server. The following procedure provides instructions for installation on an existing Red Hat JBoss Web Server 2.1.0 instance.

Note

In case you have already installed Red Hat JBoss BRMS on Red Hat JBoss Enterprise Application Platform, skip to Section 2.4, “Defining Roles”.

Procedure 2.1. Installing the Generic Deployable Package

  1. Download and Extract

    To download the generic deployable package zip file from the Red Hat Customer Support Portal, go to https://access.redhat.com and log in.
  2. Click Downloads.
  3. In the Product Downloads page that opens, click Red Hat JBoss BRMS.
  4. From the Version drop-down menu, select version 6.2.0.
  5. Select Red Hat JBoss BRMS 6.2.0 Deployable for All Supported Containers package and then click Download.
    Also select and download the Red Hat JBoss BRMS Core Engine files.
  6. Extract business-central.war and kie-server.war from the generic deployable archive and copy to tomcat7/webapps/ folder.
  7. Remove the .war extensions from the business-central.war and kie-server folders.
  8. Move the kie-tomcat-integration-VERSION.jar file from business-central/WEB-INF/lib in JBoss BRMS distribution to tomcat7/lib.
  9. Setup Users

    Define the users and the roles in tomcat7/conf/tomcat-users.xml as shown below. Make sure that username and roles do not conflict. For example, you should not create a user with the username of admin as that is a defined role. See Section 2.4, “Defining Roles” for a list of defined roles.
      <role rolename="admin"/>
    	<role rolename="analyst"/>
    	<user username="user" password="password" roles="admin,analyst"/>
  10. Install the transaction manager.

    Warning

    Please note that the following section describes the setup of a transaction manager, Bitronix that is not officially supported by Red Hat.
    Copy the following transaction manager jar libraries from the lib folder to $TOMCAT_DIR/lib/ directory:
    • btm-VERSION.jar
    • btm-tomcat55-lifecycle-VERSION.jar
    • jta-VERSION.jar
    • slf4j-api-VERSION.jar
    • slf4j-jdk14-VERSION.jar
    In addition, download the following library and copy it into the $TOMCAT_DIR/lib/ folder as well:
  11. Create the transaction manager configuration files in $TOMCAT_DIR/conf/:
    • btm-config.properties
      bitronix.tm.serverId=tomcat-btm-node0
      bitronix.tm.journal.disk.logPart1Filename=${btm.root}/work/btm1.tlog
      bitronix.tm.journal.disk.logPart2Filename=${btm.root}/work/btm2.tlog
      bitronix.tm.resource.configuration=${btm.root}/conf/resources.properties
      
    • resources.properties (the resource.ds1.uniqueName defines the datasource name used in tomcat resource definition later - make a note of this value).

      Example 2.1. H2 datasource definition

      resource.ds1.className=bitronix.tm.resource.jdbc.lrc.LrcXADataSource
      resource.ds1.uniqueName=jdbc/jbpm
      resource.ds1.minPoolSize=10
      resource.ds1.maxPoolSize=20
      resource.ds1.driverProperties.driverClassName=org.h2.Driver
      resource.ds1.driverProperties.url=jdbc:h2:file:~/jbpm
      resource.ds1.driverProperties.user=sa
      resource.ds1.driverProperties.password=
      resource.ds1.allowLocalTransactions=true

      Example 2.2. MySQL 5.5 datasource definition

      resource.ds1.className=com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
      resource.ds1.uniqueName=jdbc/jbpm
      resource.ds1.minPoolSize=0
      resource.ds1.maxPoolSize=10
      resource.ds1.driverProperties.URL=jdbc:mysql://localhost:3306/sampledb
      resource.ds1.driverProperties.user=dbuser
      resource.ds1.driverProperties.password=dbpassword
      resource.ds1.allowLocalTransactions=true

      Example 2.3. DB2 Type 4 datasource definition

      resource.ds1.className=com.ibm.db2.jcc.DB2Driver
      resource.ds1.uniqueName=jdbc/jbpm
      resource.ds1.minPoolSize=0
      resource.ds1.maxPoolSize=10
      resource.ds1.driverProperties.URL=jdbc:db2://localhost:50000/sampledb
      resource.ds1.driverProperties.user=dbuser
      resource.ds1.driverProperties.password=dbpassword
      resource.ds1.allowLocalTransactions=true

      Example 2.4. Oracle datasource definition

      resource.ds1.className=oracle.jdbc.xa.client.OracleXADataSource
      resource.ds1.uniqueName=jdbc/jbpm
      resource.ds1.minPoolSize=0
      resource.ds1.maxPoolSize=10
      resource.ds1.driverProperties.URL=jdbc:oracle:thin:@//localhost:1521/bpms
      resource.ds1.driverProperties.user=dbuser
      resource.ds1.driverProperties.password=dbpassword
      resource.ds1.allowLocalTransactions=true

      Example 2.5. Microsoft SQL Server datasource definition

      resource.ds1.className=com.microsoft.sqlserver.jdbc.SQLServerDriver
      resource.ds1.uniqueName=jdbc/jbpm
      resource.ds1.minPoolSize=0
      resource.ds1.maxPoolSize=10
      resource.ds1.driverProperties.URL=jdbc:sqlserver://localhost:1433;databaseName=bpms;
      resource.ds1.driverProperties.user=dbuser
      resource.ds1.driverProperties.password=dbpassword
      resource.ds1.allowLocalTransactions=true
  12. Install the Driver to Your Database

    Copy the jar file with the relevant database driver to $TOMCAT_DIR/lib/.

    Note

    If using the embedded H2 database, the driver is available in business-central/WEB-INF/lib/.
  13. Start Server and Test

    Start JBoss Web Server by running startup.sh in the tomcat7/bin directory.
    ./startup.sh
    Wait a few minutes and check the server log ($TOMCAT_DIR/tomcat7/logs) for any errors. If there are no errors, proceed to the next step.
  14. Navigate to http://localhost:8080/business-central in a web browser.
  15. Login with the username/password defined in the tomcat-users.xml file.