Configuration for MSSQL and PostgreSQL
If you use a PostgreSQL or MS SQL database, the following additional settings must be made:
Using the migration/installation tool
The migration/installation tool must be run even if no migration of an existing X4 BPMS installation is intended. For more information, see the X4 BPMS Update Guide.
Before running the migration/installation tool, you must first create an empty database named X4
.
Configuring the datasources
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.
Configure the datasources within the standalone.xml
under X4\Server\wildfly\standalone\configuration\
as follows:
...
<!-- 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> and <timeout> define settings for automatic reconnection -->
<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> and <timeout> define settings for automatic reconnection -->
<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>
<!-- MSSQL -->
<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> and <timeout> define settings for automatic reconnection -->
<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 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> and <timeout> define settings for automatic reconnection -->
<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>
<driver name="sqlserver" module="com.microsoft.sqlserver">
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
</driver>
...
</drivers>