Payara Server allows you to set the prefix and/or the suffix of the batch table name. This can be set via the Admin Console, in the domain.xml file, or using administration commands.
Important
|
The table prefix and suffix settings may be ignored by non-RDBMS based datastores. |
-
Click on the instance or cluster to move to its configuration page.
-
Select the Batch tab, and the Configuration sub-tab should load.
-
Enter your desired values in the Table Prefix and Table Suffix fields.
-
Save your changes
It’s possible to set the table prefix and/or suffix is set using the
set-batch-runtime-configuration
command. The command requires you to specify
the Executor
or DataSource
lookup name, which you can do with the -x or -d
options respectively.
The command defaults to targeting the Admin Server instance (server), to target a different instance or cluster, use the --target option.
-
To specify the prefix, use the
--tablePrefix
option. -
To specify the table suffix, use the
--tableSuffix
option.
An example can be seen below:
asadmin set-batch-runtime-configuration -d jdbc/__default --target cluster1 --tablePrefix PRE --tableSuffix SFX
This command expects the Admin Server to be listening on port 4848. If it is not, use the -p option to specify the port, for example:
asadmin -p 5048 set-batch-runtime-configuration -d jdbc/__default --target cluster1 --tablePrefix PRE --tableSuffix SFX
-
Open up the domain.xml configuration file.
-
Find the
<batch-runtime-configuration>
tag under the appropriate<config>
tag (e.g.<config name="server-config">
for the administration server), and enter the table prefix and/or suffix like so:<batch-runtime-configuration table-prefix="PRE" table-suffix="SFX"></batch-runtime-configuration>
Warning
|
If you’re editing the domain.xml of a domain that has not been started at least once, the batch-runtime-configuration tag will not exist and you will have to add it yourself. |