Show Table of Contents
3.3. Setup Datasource
The Business Central application requires a datasource which must be created prior to the deployment of the actual WAR file. This also means that you must have access to an underlying database that the datasource connects to. Whatever your underlying database, make sure you have the datasource ready. The steps below will help you set this up.
- Open up the JDBC providers panel by clicking on --> --> .
- Select the scope of this JDBC provider to include your server and node. It cannot be
All scopes. Then click the button. This will bring up theCreate new JDBC providerform page. - Fill out the form based on the database driver that you have available. If your database is not listed, select
OthersDatabase type selection box and provide the implementation class name. For example, for H2, Postgres or MySQL, the implementation class name will beorg.h2.jdbcx.JdbcDataSource,org.postgresql.xa.PGXADataSourceandcom.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSourcerespectively. - Make sure to give the JDBC Provider a name that is descriptive and click the button. You will be asked to provide the CLASSPATH for the JDBC driver class files that you have just defined. Enter this value and click the button to be taken to the summary screen. Click the button to accept and add this new JDBC Provider.
Using this new JDBC provider, you will now need to setup the actual datasource for Business Central. Before you create the datasource, however, open up the
persistence.xml file in the Business Central war file that you have downloaded. You will need to know the name of the datasource defined within this file. It is normally jdbc/jbpm.
You will also need to change the hibernate.dialect to suit your actual database. For example, if your underlying database is DB2, you would change the this property from
org.hibernate.dialect.H2Dialect to org.hibernate.dialect.DB2Dialect.
Setting up a Datasource
- Open up the datasources panel by clicking on --> --> in the WebSphere administrative panel. Click the button making sure the appropriate scope has been selected from the Scope drop-down.
- Step 1 of the "Create a Data source" form is displayed. Enter a unique Data source name that you will use to refer to this datasource by. The JDBC provider is the one you created earlier in this section, and the JNDI name is the one you looked up from the
persistence.xmlfile. Click and select the JDBC provider created earlier from the drop-down menu. Click 2 more times and accept the default values. - Click the button to save the changes and then click to save the changes in the master configuration.
- You will now need to provide the basic meta properties for this datasource. Properties like
servername,databasename,usernameandpasswordmust now be defined and vary for different databases. These properties can be defined by editing the datasource just created and then clicking onCustom propertieslink under the menu. Some example database properties are shown below.For H2 databases, you will need to define the following custom properties:- URL
- user
- password
For MySQL databases, you will need to define the following custom properties:- serverName
- databaseName
- port
- user
- password
Finally for Postgres databases, you will need to define the following custom properties:- serverName
- databaseName
- portNumber
- user
- password
- Once all the connection properties have been defined, click the to ensure the validity of the datasource.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.