Setting a Table Prefix and/or Suffix
Payara Server Enterprise 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.
The table prefix and suffix settings may be ignored by non-RDBMS based datastores. |
Setting a Table Prefix and/or Suffix on the Admin Console
-
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
Setting a Table Prefix and/or Suffix using administration commands
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
Setting a Table Prefix and/or Suffix in the domain.xml file
-
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>
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. |