3.3. Creating a Data Source

The Business Central application requires a data source 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.
  1. Navigate to ServicesData Sources, which takes you to your JDBC Data Sources list.
  2. Click NewGeneric Data Source to start creating a new data source.
  3. Provide your data source with the following details:
    • Name - Enter a name for your data source.
    • JNDI Name - Set to jdbc/jbpm.
    • Database Type - Set to MySQL.

    Note

    You can use alternative database types by editing WEB-INF/classes/META-INF/persistence.xml in the Business Central WAR archive. Edit the hibernate.dialect property to your preferred database. For example, to change to OracleDB, edit the hibernate.dialect to the following:
    <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle9Dialect"/>
    
    Click Next to advance to the next configuration screen.
  4. Select your Database Driver in the drop-down menu. Click Next to advance to the next configuration screen.
  5. Leave the Transaction Options as the defaults and click Next to advance to the next configuration screen.
  6. Provide the following Connection Properties for your data source:
    • Database Name - The name of the database to use on your data source.
    • Host Name - The hostname or IP address of the system containing the database.
    • Port - The port used to connect to the database. Unless you have configured the database to use a different port, use the default port provided in this field.
    • Database User Name - The database user that interacts with the database. Make sure the chosen user has the required permissions to access and write to the chosen database.
    • Password - The password for the chosen database user.
    Click Next to advance to the next configuration screen.
  7. The Test Database Connection page provides a means to test and confirm your database connection. Click Test Configuration and the page will refresh with a valid connection message. Click Finish to complete the data source configuration.
  8. Click on the name of the new data source and navigate to Targets tab. Click the checkbox for the server chosen to host the Business Central deployment. Click Save to save your selection.