SQL Parameter Storage
The SQL Parameter Storage plugin is used to persist global parameters in the database. You need to create the plugin to persist global parameters in an existing database or to create a new database. For more information about global parameters, see Global Parameters.
Warning
If you want to use the SQL Parameter Storage plugin, you cannot use any other method for the Global Parameter Storage. You can only use one method to persist the global parameters.
Warning
The first start of the SQL Parameter Storage plugin must be executed by a database user who has the permission to create database tables. After all tables required have been created, a user with fewer permissions can take over.
Note:
The SQL Parameter Storage plugin can be used in two ways:
- Recommended use: If the
UseLegacyDatabase
element is set tofalse
a connection is made to a database where no parameter tables exist. The tables for theplaceholder_groups
andplaceholder_values
parameters are created automatically. - If the
UseLegacyDatabase
element is set totrue
gesetzt ist, a connection to the already existing parameter tables in the X4 database is established and these tables are used.
How to configure the SQL Parameter Storage plugin
- In the folder
<server_directory>/configurations
, create the filesql_globalparameter_storage_config.xml
. Insert the following content.
XML<?xml version="1.0"?> <Configuration> <DatabaseConfiguration> <ConnectionString></ConnectionString> <UserName></UserName> <Password></Password> </DatabaseConfiguration> <UseLegacyDatabase>false</UseLegacyDatabase> </Configuration>
Enter the required values in the
sql_globalparameter_storage_config.xml
file.
Database Configuration
Element | Description | Possible values |
---|---|---|
ConnectionString | JDBC connection string for the connection to the database
For more information, see the official JDBC database documentation.
|
|
UserName | User name for the login to the database |
|
Password | Password for the login to the database |
|
UseLegacyDatabase | Determines whether:
or
|
|
How to install the plugin
Note:
If you enable the SQL Parameter Storage plugin, the
default properties
folder with subfolders in memory will no longer be used:
<server_directory>\wildfly\modules\de\softproject\x4\plugins
\globalparameter\properties
Before installing the plugin, delete the properties
with contents.
- Unzip the downloaded
.zip
file with the plugin. - Copy the
<file_directory>\de
folder to the<server_directory>\wildfly\modules\de\softproject\x4\plugins
folder. - Open the
module.xml
file in the<server_directory>
\wildfly\
modules\de\softproject\plugins
\main folder. Delete the following line from the
module.xml
file:<module name="de.softproject.x4.plugins.globalparameter.properties" export="true"/>
Copy the plugin name into the
<dependencies>
tag:<module name="de.softproject.x4.plugins.globalparameter.sql" export="true"/>
The content of the file should be structured in this way:- Restart the X4 Server.
The plugin is available after the server restart.