Questo contenuto non è disponibile nella lingua selezionata.
Chapter 5. Configuring JDBC data sources for Process Server
A data source is an object that enables a Java Database Connectivity (JDBC) client, such as an application server, to establish a connection with a database. Applications look up the data source on the Java Naming and Directory Interface (JNDI) tree or in the local application context and request a database connection to retrieve data. You must configure data sources for Process Server to ensure proper data exchange between the servers and the designated database.
For production environments, specify an actual data source. Do not use the example data source in production environments.
Prerequisites
- The JDBC providers that you want to use to create database connections are configured on all servers on which you want to deploy Process Server, as described in the "Creating Datasources" and "JDBC Drivers" sections of the Red Hat JBoss Enterprise Application Server Configuration Guide.
- The Red Hat Process Automation Manager 7.6.0 Add Ons (rhpam-7.6.0-add-ons.zip) file is downloaded from the Software Downloads page in the Red Hat Customer Portal.
Procedure
Complete the following steps to prepare your database:
-
Extract
rhpam-7.6.0-add-ons.zipin a temporary directory, for exampleTEMP_DIR. -
Extract
TEMP_DIR/rhpam-7.6.0-migration-tool.zip. -
Change your current directory to the
TEMP_DIR/rhpam-7.6.0-migration-tool/ddl-scriptsdirectory. This directory contains DDL scripts for several database types. Import the DDL script for your database type into the database that you want to use, for example:
psql jbpm < /ddl-scripts/postgresql/postgresql-jbpm-schema.sql
psql jbpm < /ddl-scripts/postgresql/postgresql-jbpm-schema.sqlCopy to Clipboard Copied! Toggle word wrap Toggle overflow
-
Extract
-
Open
EAP_HOME/standalone/configuration/standalone-full.xmlin a text editor and locate the<system-properties>tag. Add the following properties to the
<system-properties>tag where<DATASOURCE>is the JNDI name of your data source and<HIBERNATE_DIALECT>is the hibernate dialect for your database.NoteThe default value of the
org.kie.server.persistence.dsproperty isjava:jboss/datasources/ExampleDS. The default value of theorg.kie.server.persistence.dialectproperty isorg.hibernate.dialect.H2Dialect.<property name="org.kie.server.persistence.ds" value="<DATASOURCE>"/> <property name="org.kie.server.persistence.dialect" value="<HIBERNATE_DIALECT>"/>
<property name="org.kie.server.persistence.ds" value="<DATASOURCE>"/> <property name="org.kie.server.persistence.dialect" value="<HIBERNATE_DIALECT>"/>Copy to Clipboard Copied! Toggle word wrap Toggle overflow The following example shows how to configure a datasource for the PostgreSQL hibernate dialect:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
The following dialects are supported:
-
DB2:
org.hibernate.dialect.DB2Dialect -
MSSQL:
org.hibernate.dialect.SQLServer2012Dialect -
MySQL:
org.hibernate.dialect.MySQL5InnoDBDialect -
MariaDB:
org.hibernate.dialect.MySQL5InnoDBDialect -
Oracle:
org.hibernate.dialect.Oracle10gDialect -
PostgreSQL:
org.hibernate.dialect.PostgreSQL82Dialect -
PostgreSQL plus:
org.hibernate.dialect.PostgresPlusDialect -
Sybase:
org.hibernate.dialect.SybaseASE157Dialect