3.2. Setting up Persistence for Dashbuilder

As Dashbuilder is dependent on the configuration of Business Central, ensure Business Central is configured according to Section 3.1, “Setting up Persistence for Business Central”. Red Hat JBoss BPM Suite 6 is configured to use a datasource with Java Naming and Directory Interface (JNDI) name java:jboss/datasources/ExampleDS. If you want to make the application work with a database different from H2, for example Oracle, MySQL, Postgres, or MS SQL Server, follow these steps.

Note

If you want to use UTF 8 to display non-English characters, you should check your database documentation and set up the encoding at the level of database in order for Dashbuilder to work correctly. For example in MySQL, add the following to the server configuration file:
[mysqld]
character-set-server=utf8
collation-server=utf8_general_ci

Important

On Unix like systems override the default value of MySQL lower_case_table_names from 0 (case sensitive) to 1 (case insensitive). The JBoss BPM Suite KPI queries are written in lowercase but the table names are in camelCase. By changing the lower_case_table_names property you will prevent exceptions from occurring later on.
  1. Install the database driver and create a new datasource according to the example in EAP 6 Documentation in section 6.7.1. Example PostgreSQL Datasource. Use modular approach to the installation of JDBC driver for easy subsequent configuration.
  2. Create an empty database.
  3. Modify file dashbuilder.war/WEB-INF/jboss-web.xml whose default entry is:
      	<jboss-web>
        <context-root>/dashbuilder</context-root>
        <resource-ref>
            <res-ref-name>jdbc/dashbuilder</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <jndi-name>java:jboss/datasources/ExampleDS</jndi-name>
        </resource-ref>
    
  4. Modify also files WEB-INF/jboss-deployment-structure.xml from both the business-central.war and dashbuilder.war applications, and add a dependency under the dependencies section on the JBDC driver module created earlier during datasource creation. The following snippet shows a sample configuration where jdbcDriverModuleName is the name of the JBoss EAP 6 JDBC driver module.
      <dependencies>
             ...
                <module name="jdbcDriverModuleName" />
                ...
      </dependencies>