Transaction server Run Engine commands

Use the following Run Engine commands to configure the Transaction server Docker container.

The following table contains the default Run Engine commands. To view the scripts, start with /SETUP/bin/entrypoint.sh. If you want to implement custom logic or override existing configurations, ensure that the necessary parameters can be resolved by the commands during startup.

Run Engine commands for the Transaction server.

Description Command
Set or change the merchant key. run update-encrypted-merchantkey MERCHANTKEY_ENCRYPT
MERCHANTKEY_ENCRYPT
The encrypted merchant key, encrypted with the key encryption key. The merchant key was created when you or an administrator loaded the HCL Commerce database schema.
For more information, see:
Important: You must specify your own merchant key and key encryption key values for the security of your Commerce+ installation. Do not use the default values contained within the provided sample configuration files and documentation examples.
Set or change the key encryption key. run update-key-encryption-key KEY_ENCRYPTION_KEY
KEY_ENCRYPTION_KEY
The plain text key that is used to encrypt the merchant key. The key encryption key is required to be 32 characters.
The SPI username and password is used for inter-component server API invocation only. The spiuser is configured in the Store server, Search server and Customization server, and used in the API invocation from those servers to the Transaction server. The images need to be configured with the spiuser password, otherwise the component servers cannot connect to the Transaction server.

Sets Java virtual machine (JVM) property: spi.username, spi.password

run set-spi-user userName ASCII_encrypted_password
userName
SPI username. The default user name is spiuser.
password
The ASCII encrypted password. You can encrypt the password by using utilities_root/wcs_encrypt.sh utility.
Set the connection to the Ingest server. run set-ingest-server hostName port
hostName
The Ingest server host name.
port
The Ingest server port.
Sets the connector server host and port. run set-connector-server <hostName> <port>
Where,
hostName
Connector Server Host Name.
port
Connector Server Port Number.
For authoring environments, add JAAS, JDBC provider, datasource connection information to connect to the live database. run add-datasource jndi dbName dbType dbHost dbPort dbUser dbPass xa sslConnect
jndi
The name of the JNDI.
The default value for the Transaction server is jdbc/WCDataSource.
dbName
The name of the database.
dbType
The database type.
For example, db2.
dbHost
The host name of the database server.
dbPort
The database server port.
dbUser
The database user name.
dbPass
The database password.
xa
A boolean value. Determines whether it is an XA data source. Set this value to false if you are using the default datasource.
sslConnect
A boolean value. Enable SSL connection.
Add a database connection datasource for PostgreSQL. run add-datasource-postgres jndi database dbHost dbPort dbUser dbPass xa sslConnect
jndi
The name of the JNDI.
The default value for the Transaction server is jdbc/WCDataSource.
database
The name of the database.
dbHost
The host name of the database server.
dbPort
The database server port.
dbUser
The database user name.
dbPass
The database password.
xa
A boolean value. Determines whether it is an XA data source. Set this value to false if you are using the default datasource.
sslConnect
A boolean value to specify whether to use an SSL connection.
Configure the connection to the Store server. run set-store-server hostName port
hostName
Store host name.
port
Store port.
Set Store server host name in the foundation wc-component.xmlconfiguration file. sed -i "s/value=\"store\"/value=\"${STORE_HOST}\"/g" /opt/ol/wlp/usr/servers/transactionServer/apps/ts.ear/xml/config/com.ibm.commerce.foundation/wc-component.xml
Note: This is not a Run Engine command, but it is a configuration that is required for the Commerce Lab store preview function to work. If the host name of your Store server Docker container is not store, then you must change the value as needed using this command.
Set the connection to the React-based store Store server. run set-react-store-server hostName port
hostName
The React-based store Store server host name.
port
The React-based store Store server port.
Configure the connection to the Customization server. run set-xc-server hostName port
hostName
The Customization server host name.
port
The Customization server port number.
Configure the connection to the Store server web server for stores that have been migrated from WebSphere Commerce Version 7 or Version 8. run set-store-web-server storeWebHost storeWebPort
storeWebHost
Host name of the web server for the migrated store.
storeWebPort
Web server port.
Update the database user and password credentials that are used to connect to the database. run update-datasource-cred jndi dbUser dbPass
jndi
The name of the JNDI.
The default value for the Transaction server is jdbc/WCDataSource.
dbUser
The user name to connect to the DB2 database.
dbPass
The password for the dbUser.
Update the database server host name, port, database name, and the user and password credentials that are used to connect to the database. run update-datasource-db jndi database dbHost dbPort sslConnect
jndi
The name of the JNDI.
The default value for the Transaction server is jdbc/WCDataSource.
database
The name of the database.
dbHost
The host name of the database server.
dbPort
The database server port.
sslConnect
(Optional) Enable or disable the SSL protocol. If set to True, SSL is used. If False, SSL is disabled.
Add the JVM parameter string to existing JVM options (/Server:server1/JavaProcessDef:/JavaVirtualMachine:/). run add-generic-jvmarg jvmArg
jvmArg
The JVM argument.
For example, the following command sets -Xgcpolicy:gencon to a generic JVM argument.
run add-generic-jvmarg -Xgcpolicy:gencon 
Create new object cache instance. You can see the object cache list in Resources/Cache instances/Object cache instances of the Open Liberty Server Administrative Console in the Transaction server. run add-objectcache jndiName cacheSize replicationType sizeMB
jndi
The JNDI name of the object cache.
cacheSize
(Integer) The maximum size, in number of entries, of the object cache.
replicationType
Important: This parameter is deprecated and is currently ignored. It is kept for backwards compatibility only and will be removed in future releases.
Replication type of the object cache.
Accepted values are:
  • PULL
  • PUSH
  • PUSH_PULL
  • NONE
sizeMB

Optional: (Integer) The size of the object cache in megabytes (MB).

Note: This command adds an object cache instance if one does not exist.
Create a reserved work manager and set the maximum thread number to 10. run add-work-manager-reserved
Create a work manager and set the maximum number of threads. run add-work-manager name maxThread
name
The Work Manager name.
maxThread
The maximum number of threads for the work manager. Adds a Work Manager if it does not exist.
Check whether the server1 is started by running the serverStatus command. run get-status
Set the maximum size of the trace log file. run set-trace-file-maximum-size size
size
The size of the trace log file, in MB. The accepted value is an integer in the range from 0 to 20000 (20,000). A value of 0 indicates no limit. By default this value is set to 20.
Set the maximum number of historical trace files. run set-trace-file-maximum-number number
number
The maximum number of historical trace files. The accepted range is from 0 to 50. A value of 0 indicates no limit. By default this value is set to 5.
Set the trace format. run set-trace-format traceFormatType
traceFormatType
The trace format type.
Accepted values are:
  • ADVANCED
  • BASIC
  • ENHANCED
  • TBASIC
By default, this value is set to BASIC.
Set the default trace level for Open Liberty Server applications. This will take effect after the next restart of the application and is persisted through any subsequent restart. run set-trace-specification spec
spec
The new logging trace specification.
Note:
  • This method sets the trace level for any application, and takes effect the next time the application is started within the container. It will not apply to an already running application. This method is analagous to setting trace level within the Diagnostic Trace > Configuration tab within the Open Liberty Server Administrative Console.
  • set-trace-specification does not work when JSON/HPEL logging mode is enabled. You must create your own custom run engine command to set trace specification with this mode.
Make trace.log and ffdc log generate to this directory. run set-trace-log-directory directory
directory
The location to write the logs.
Set the initialHeapSize and maximumHeapSize values. run set-heap-size initHeapSize maxHeapSize
initHeapSize
The minimum heap size.
maxHeapSize
The maximum heap size.
Create string name space binding. run set-jndi-entry jndi value
jndi
The JNDI name.
value
The JNDI value.
Set a custom JVM property. run set-system-property name value
name
JVM system property name.
value
JVM system property value.

For example, run set-system-property SKIP_IDENTIFIER_CHECK true

Sets a JVM custom property SKIP_IDENTIFIER_CHECK to true.

Update the size of object cache instances. The size can be limited in number of lines, or in number of megabytes (MB). run update-objectcache-size jndi size sizeMB
jndi
The JNDI name of the object cache.

The JNDI value can be basecache (case insensitive) to update the basecache value.

size
The maximum size, in number of entries, of the object cache.
sizeMB
Optional: The maximum size, in megabytes (MB), of the object cache.
For example:
  • run update-objectcache-size dmap/PriceCache 30000

    If a cache instance with JNDI name dmap/PriceCache exists, limit the number of entries to 30000 with no limits on the size.

  • run update-objectcache-size dmap/PR_Cache 5000 400

    If a cache instance with JNDI name dmap/PR_Cache exists, limit the number of entries to 5000 and/or 400MB.

  • run update-objectcache-size basecache 3000 1000

    Update the basecache limits to 3000 entries and/or 1000MB.

The set-cache-provider command includes two functions:
  • Generate a list of cache instances by their JNDI name and output it to a file.
    Note: The generated file is compatible with the run set-cache-provider cacheProvider filename command.
  • Set specified cache instances to a defined cache provider.

    For example, hcl-cache or dynacache.

  • run set-cache-provider print filename
print
Prints all JNDI names of cache instances.
filename
Specify a full path and file name for the generated file. If a full path is not specified the file is generated in the current directory.
  • run set-cache-provider cacheProvider all
  • run set-cache-provider cacheProvider jndiName
  • run set-cache-provider cacheProvider filename
cacheProvider
The cache provider name that you want to switch the specified cache instances to. The accepted values are hcl-cache or dynacache.
jndiName
Specify the specific cache instance, specified by the jndiName, is to be switched to the specified provider.
all
Specify that all cache instances are to be switched to the specified provider.
filename
Use a filename that contains JNDI names to specify the cache instances that are to be switched to the specified provider.

You can use the set-cache-provider print command to generate a file in the accepted format.

For example:
  • set-cache-provider dynacache all will set all caches to use dynacache.
  • set-cache-provider hcl-cache services/cache/WCFlexFlowDistributedMapCache will set the services/cache/WCFlexFlowDistributedMapCache cache to use hcl-cache.
  • set-cache-provider hcl-cache filename will set the caches specified by their JNDI names in the file filename to use hcl-cache.
Merge cachespec.xml cache configuration files. run merge-cachespec source_file target_file
source_file
The source cachespec.xml configuration file to be merged from.
target_file
The target cachespec.xml configuration file to be merged into.
Important: Ensure that you back up the target cachespec.xml configuration file before running this command. This file will be modified by this command.
Set AllowedDomain value under Webmodules in wc-server.xml. run add-allowed-domain domainName moduleName
domainName
The domain name that Commerce+ allows redirection to. For example, domain.com.
moduleName
The module name. For example, Stores, Preview, LOBTools.
Set AllowedHost value under Webmodules in wc-server.xml. run add-allowed-host hostName moduleName
hostName
The host name that Commerce+ allows redirection to. For example, host.domain.com.
moduleName
The module name. For example, Stores, Preview, LOBTools.
Update the settings of a work manager if the work manager exists. run update-work-manager-thread name minThreads maxThreads threadPriority
name
The WorkManager name.
minThreads
The minimum number of threads.
maxThreads
The Maximum number of threads.
threadPriority
The priority to assign to all threads in the thread pool.
Change JVM property (EncryptionKeysInSystemProperty, CurrentEncryptedMerchantKey, CurrentEncryptedSessionKey). run set-encryption-keys merchantKey sessionKey
merchantKey
The encrypted merchant key.
sessionKey
The encrypted session key.
Set or change the session key in wc-server.xml. run set-session-key sessionKey
sessionKey
The encrypted session key.
Enable or disable the single sign-on (SSO) keepAliveSession parameter in wc-server.xml. This parameter allows you to keep a session alive beyond the standard Commerce+ session timeout. run set-sso-keep-alive-session value
value
A boolean value. Accepted values are:
  • true for enabling the keepAliveSession parameter.
  • false for disabling the keepAliveSession parameter.
Change MQ connection pool information. run change-mqadapter-max-connection connectionNumber
connectionNumber
Maximum number of connections.
The default maximum connection number is 10.
Create JMS connection factory. run create-jms-connection-factory mqServerHost mqServerPort queueManager connectionNumber
mqServerHost
IBM MQ Server.
mqServerPort
IBM MQ Server port.
queueManager
IBM MQ queue manager.
connection Number
Maximum connection number.
The default maximum connection number is 10.

For example, run create-jms-connection-factory test.hcl.com 1414 FVT 15

IBM MQ server is test.hcl.com, port is 1414, queueManager is FVT.

Create JMS queues. create-jms-queues queueManager
queueManager
IBM MQ queue manager.

For example, run create-jms-queues FVT

Enable application activity sessions. run enable-activity-session timeout
timeout
The timeout value in seconds.
The default value is 300 seconds.
Set schedulerID. run add-generic-jvmarg -Dcom.ibm.commerce.scheduler.SchedulerHostName=${schedulerID}

Works with schedulerCloneID.

Set schedulerCloneID. run add-generic-jvmarg -Dcom.ibm.commerce.scheduler.SchedulerCloneId=${schedulerCloneID}

Works with schedulerID.

Update datasource server. update-wc-server-datasource dbType dbHost dbPort dbname dbauser dbapassword dbuser dbpassword
Where,
dbType
The database type.
For example db2, or oracle.
dbHost
The host name of the database server.
dbPort
The database server port.
dbname
The name of the database.
dbauser
Database admin user.
dbapassword
Database admin encrypted password.
dbuser
The database user name.
dbpassword
Database encrypted password.
To clear any trace level that is set and takes effect on the next container start. run reset-trace-specification
Create an Oracle datasource to a server configuration. run add-datasource-oracle jndi database dbHost dbPort dbUser dbPass xa sslConnect
Where,
jndi
Datasource JNDI name.
database
Database name.
dbHost
Database hostname
dbPort
Database port.
dbUser
Database username
dbPass
Database password.
xa
XA datasource (true/false).
sslConnect
SSL connection (default true).
Set the trace format for logs. run set-trace-format traceformatType
traceFormatType
The trace format type.
Accepted values are:
  • ADVANCED
  • BASIC
  • ENHANCED
  • TBASIC
By default, this value is set to BASIC.
Configure React Store Service hostname and port. run set-react-store-service hostName port
Where,
hostName
React Store Service Host Name.
port
React Store Service SSL Port.
Configure React Store Server Preview hostname and port. run set-react-store-server-preview hostName port
Where,
hostName
React Store Preview Host Name.
port
React Store Preview Port.
Create a PostgreSQL datasource to a server configuration. run add-datasource-postgres jndi database dbHost dbPort dbUser dbPass xa sslConnect
Where,
jndi
Datasource JNDI name.
database
Database name.
dbHost
Database hostname
dbPort
Database port.
dbUser
Database username
dbPass
Database password.
xa
XA datasource (true/false).
sslConnect
SSL connection (default true).
Convert the ts-app OOTB image to a ts-app live image. run convert-to-live
Enable MQ in wc-server.xml configuration. run enable-mq-in-wc-server-xml filePath
Where,
filePath
Optional path to wc-server.xml file (default: /opt/ol/wlp/usr/servers/transactionServer/apps/ts.ear/xml/config/wc-server.xml).
Enable SSO in wc-server.xml configuration. run enable-sso-wc-server-xml filePath
Where,
filePath
Optional path to wc-server.xml file (default: /opt/ol/wlp/usr/servers/transactionServer/apps/ts.ear/xml/config/wc-server.xml).
Update local store web server configuration. run update-localstore-webserver hostname filePath
Where,
hostname
Local store web host.
filePath
Optional path to wc-server.xml file (default: /opt/ol/wlp/usr/servers/transactionServer/apps/ts.ear/xml/config/wc-server.xml).
Update wc-server.xml configuration. run update-wc-server-xml filePath
Where,
filePath
Optional path to wc-server.xml file (default: /opt/ol/wlp/usr/servers/transactionServer/apps/ts.ear/xml/config/wc-server.xml).
Enable or configure workspace settings in JVM. run update-workspace-enable enableWorkspace enableWorkspaceChangeHistory enableBaseChangeHistory enableWorkspaceChangeHistoryAuditEnabled
Where,
enableWorkspace
Enable/disable workspace (true/false)
enableWorkspaceChangeHistory
Enable/disable change history (true/false).
enableBaseChangeHistory
Enable/disable base change history (true/false).
enableWorkspaceChangeHistoryAuditEnabled
Enable/disable change history audit (true/false).
Add a new SPI registry. run add-spi-registry registryId username password
Where,
registryId
Unique SPI registry ID.
username
SPI integration username.
password
SPI integration password.
Add a new JNDI entry to the server configuration. run add-jndi-entry name value
Where,
name
JNDI name.
value
JNDI value
Add a new JVM system property to the jvm.options file. run add-system-property name value
name
JVM system property name.
value
JVM system property value.
Enable JSON logging on the Liberty Server. run enable-json-logging
Create configuration properties file for run engine commands. run generate-config-properties LibertyHome ServerName
LibertyHome
Location of Liberty Home.
ServerName
Name of the Liberty server.
Update an existing JNDI entry in the server configuration. run update-jndi-entry name value
name
JNDI name.
value
JNDI value.
Update SPI registry user password. run update-spi-registry-user-password registryId username password
registryId
Unique SPI registry ID.
username
SPI integration username.
password
New SPI integration password.
Update an existing JVM system property in the jvm.options file. run update-system-property name value
name
JVM system property name.
value
JVM system property value.
Configure transaction server by setting transaction host name, secured port, and nonsecured port. set-transaction-server hostName securedPort nonsecuredPort
hostName
Transaction Server Host Name.
securedPort
Transaction Server Secured Port.
NonsecuredPort
Optional: Transaction Server Nonsecured Port
Update connection manager attribute in datasource file. Command run update-datasource-connectionmanager-attribute jndi attributename attributevalue
jndi
The name of the JNDI. The default value for the Transaction server is jdbc/WCDataSource.
attributename
Name of attribute maxIdleTime, maxPoolSize and minPoolSize are supported attribute.
attributevalue
Value of attribute. Below three attribute supported in connectionmanager:
  • maxIdleTime: A value of -1 disables this timeout. Default value 30m.
  • maxPoolSize: A value of 0 means unlimited. Default value 50.
  • minPoolSize