If you want to use an external database for X4 BPMS, additional configuration steps are required. X4 BPMS supports the following database systems:
-
Oracle Database
-
PostgreSQL
-
Microsoft SQL Server (MSSQL)
1. Prerequisites & Preparation
Before you begin configuring the datasources, you must complete the following mandatory steps:
-
Create an empty database: Create an empty database named
X4on your database system beforehand. -
Run the migration and installation tool: You must run the X4 migration or installation tool. This step is mandatory, even if you do not intend to migrate an existing X4 BPMS installation.
For more information, see the X4 BPMS Update Guide.
2. Datasources in der standalone.xml konfigurieren
External databases are integrated by configuring the datasources within the central configuration file of the WildFly Application Server.
File path: X4\Server\wildfly\standalone\configuration\standalone.xml
Open the file and replace or add the corresponding <datasource> and <driver> blocks within the <datasources> subsystem according to your database system.
Option A: PostgreSQL Konfiguration
<!-- PostgreSQL -->
<datasource jta="false" jndi-name="java:/X4BAM_DS" pool-name="X4BAM_DS" enabled="true" use-java-context="true">
<connection-url>jdbc:postgresql://localhost:5432/X4</connection-url>
<driver>postgresql</driver>
<new-connection-sql>SET search_path TO X4SERVER;</new-connection-sql>
<pool>
<max-pool-size>20</max-pool-size>
</pool>
<security user-name="x4" password="x4"/>
<statement>
<prepared-statement-cache-size>20</prepared-statement-cache-size>
<share-prepared-statements>true</share-prepared-statements>
</statement>
<!-- In <validation> und <timeout> Einstellungen zur automatischen Verbindungsherstellung der Verbindung vornehmen -->
<validation>
<check-valid-connection-sql>select 1</check-valid-connection-sql>
<validate-on-match>false</validate-on-match>
<background-validation>true</background-validation>
<background-validation-millis>1000</background-validation-millis>
</validation>
<timeout>
<allocation-retry>60</allocation-retry>
<allocation-retry-wait-millis>1000</allocation-retry-wait-millis>
</timeout>
</datasource>
<datasource jndi-name="java:/PermissionDS" pool-name="PermissionDS" enabled="true" use-java-context="true">
<connection-url>jdbc:postgresql://localhost:5432/X4</connection-url>
<driver>postgresql</driver>
<new-connection-sql>SET search_path TO X4SERVER;</new-connection-sql>
<pool>
<max-pool-size>20</max-pool-size>
</pool>
<security user-name="x4" password="x4"/>
<statement>
<prepared-statement-cache-size>20</prepared-statement-cache-size>
<share-prepared-statements>true</share-prepared-statements>
</statement>
<!-- In <validation> und <timeout> Einstellungen zur automatischen Verbindungsherstellung der Verbindung vornehmen -->
<validation>
<check-valid-connection-sql>select 1</check-valid-connection-sql>
<validate-on-match>false</validate-on-match>
<background-validation>true</background-validation>
<background-validation-millis>1000</background-validation-millis>
</validation>
<timeout>
<allocation-retry>60</allocation-retry>
<allocation-retry-wait-millis>1000</allocation-retry-wait-millis>
</timeout>
</datasource>
<drivers>
...
<driver name="postgresql" module="org.postgresql">
<driver-class>org.postgresql.Driver</driver-class>
</driver>
...
</drivers>
Option B: Microsoft SQL Server (MSSQL) Konfiguration
Note:
Please observe the following when configuring an MSSQL database in a local development environment:
Make sure to use encrypt=false in the JDBC URL. Otherwise, it is not possible to start the server and/or to migrate the database due to a TLS error.
<!-- MSSQL -->
<datasource jta="false" jndi-name="java:/X4BAM_DS" pool-name="X4BAM_DS" enabled="true" use-ccm="true">
<connection-url>jdbc:sqlserver://localhost:1433;databaseName=X4;encrypt=false</connection-url>
<driver>sqlserver</driver>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<pool>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
</pool>
<security user-name="x4" password="x4"/>
<!-- In <validation> und <timeout> Einstellungen zur automatischen Verbindungsherstellung der Verbindung vornehmen -->
<validation>
<check-valid-connection-sql>select 1</check-valid-connection-sql>
<validate-on-match>false</validate-on-match>
<background-validation>true</background-validation>
<background-validation-millis>1000</background-validation-millis>
</validation>
<timeout>
<allocation-retry>60</allocation-retry>
<allocation-retry-wait-millis>1000</allocation-retry-wait-millis>
</timeout>
</datasource>
<datasource jndi-name="java:/PermissionDS" pool-name="PermissionDS" enabled="true" use-ccm="true">
<connection-url>jdbc:sqlserver://localhost:1433;databaseName=X4;encrypt=false</connection-url>
<driver>sqlserver</driver>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<pool>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
</pool>
<security user-name="x4" password="x4"/>
<!-- In <validation> und <timeout> Einstellungen zur automatischen Verbindungsherstellung der Verbindung vornehmen -->
<validation>
<check-valid-connection-sql>select 1</check-valid-connection-sql>
<validate-on-match>false</validate-on-match>
<background-validation>true</background-validation>
<background-validation-millis>1000</background-validation-millis>
</validation>
<timeout>
<allocation-retry>60</allocation-retry>
<allocation-retry-wait-millis>1000</allocation-retry-wait-millis>
</timeout>
</datasource>
<drivers>
...
<driver name="sqlserver" module="com.microsoft.sqlserver">
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
</driver>
...
</drivers>
Option C: Oracle Database Konfiguration
<!-- ORACLE -->
<datasource jta="false" jndi-name="java:/X4BAM_DS" pool-name="X4BAM_DS" enabled="true" use-java-context="true">
<connection-url>jdbc:oracle:thin:@localhost:1521/pluggable-database</connection-url><!-- Hier den entsprechenden Host, Port, SID oder Service-Namen entragen -->
<driver>oracle</driver><!-- Hier den Treiber-Namen eintragen -->
<security user-name="X4SERVER" password="X4"/>
<statement>
<prepared-statement-cache-size>32</prepared-statement-cache-size>
</statement>
<!-- In <validation> und <timeout> Einstellungen zur automatischen Verbindungsherstellung der Verbindung vornehmen -->
<validation>
<check-valid-connection-sql>select 1 from dual</check-valid-connection-sql>
<validate-on-match>false</validate-on-match>
<background-validation>true</background-validation>
<background-validation-millis>1000</background-validation-millis>
</validation>
<timeout>
<allocation-retry>60</allocation-retry>
<allocation-retry-wait-millis>1000</allocation-retry-wait-millis>
</timeout>
</datasource>
<datasource jta="true" jndi-name="java:/PermissionDS" pool-name="PermissionDS" enabled="true" use-java-context="true">
<connection-url>jdbc:oracle:thin:@localhost:1521/pluggable-database</connection-url><!-- Hier den entsprechenden Host, Port, SID oder Service-Namen entragen -->
<driver>oracle</driver><!-- Hier den Treiber-Namen eintragen -->
<security user-name="X4SERVER" password="X4"/>
<statement>
<prepared-statement-cache-size>32</prepared-statement-cache-size>
</statement>
<!-- In <validation> und <timeout> Einstellungen zur automatischen Verbindungsherstellung der Verbindung vornehmen -->
<validation>
<check-valid-connection-sql>select 1 from dual</check-valid-connection-sql>
<validate-on-match>false</validate-on-match>
<background-validation>true</background-validation>
<background-validation-millis>1000</background-validation-millis>
</validation>
<timeout>
<allocation-retry>60</allocation-retry>
<allocation-retry-wait-millis>1000</allocation-retry-wait-millis>
</timeout>
</datasource>
<drivers>
...
<driver name="oracle" module="com.oracle.ojdbc"><!-- Hier den Modul-Namen eintragen -->
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
</driver>
...
</drivers>