Run Engine commands for Transaction server

Use the following Run Engine commands to configure the Transaction server Docker container. The following table contains the default Run Engine commands for the server to start. To view the scripts, start with /SETUP/bin/entrypoint.sh. To implement custom logic or override existing configurations, ensure that the necessary parameters can be resolved by the commands during startup.

Description Command
Convert the environment to an authoring environment. Converts the ts-app live image to authoring image. run convert-to-auth
Set or change merchant key. run update-encrypted-merchantkey <MERCHANTKEY_ENCRYPT>

Set JVM properties: 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. We can encrypt the password by using utilities_root/wcs_encrypt.sh utility.

For development or authoring environment, set Search server name binding. run set-search-server <search_host> <search_port>

    search_host
    Search host name.

    search_port
    Search port.

For live environments, set Search server name binding for the Search repeater. run set-search-server <search_host> <search_port> [search_repeater_host] [search_repeater_port]

    search_host
    Search host name.

    search_port
    Search port.

    search_repeater_host
    Search Repeater hostname, for live environments.

    search_repeater_port
    Search Repeater port, for live environments (for example, 3738).

For authoring environments, add JAAS, JDBC provider, datasource connection information to connect to the live database. run add-datasource <jndi> dbNamedbType dbHost dbPortdbUser 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
    (Boolean) Determines whether it is an XA data source. Set this value to false if we are using the default datasource.

    sslConnect
    (Boolean) Enable SSL connection.

Set connection to Store server. run set-store-server <hostName> <port>

    hostName
    Store host name.

    port
    Store port.

Set store host name in the foundation wc-component.xml sed -i "s/value=\"store\"/value=\"${STORE_HOST}\"/g" /opt/WebSphere/AppServer/profiles/default/installedApps/localhost/ts.ear/xml/config/com.ibm.commerce.foundation/wc-component.xml

Note: This is not a Run Engine command but it is a configuration needed for Management Center store preview to work. If the host name of your Store server Docker container is not store, then change the value as needed.

Set connection to Customization server by setting customization schema, host name, and port number. run set-xc-server <hostName> <port>

    hostName
    Customization server host name.

    port
    Customization server port number.

Set connection to the Store web server for stores that are 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 database user and password credentials 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 database name, database server host name, database server port credentials 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. We can see the object cache list in Resources/Cache instances/Object cache instances of the WebSphere Application Server Administration Console in the Transaction Server. run add-objectcache <jndiName> <cacheSize> replicationType

    jndiName
    (String) JNDI Name of the object cache.

    cacheSize
    (Integer) Size of the object cache in MB.

    replicationType
    Replication type of the object cache. Valid values are

    • PULL

    • PUSH

    • PUSH_PULL

    • NONE

Note: This command adds an object cache instance if one does not exist.

Updates virtualhosts.xml run add-virtual-host <VirtualHostName> <ListOfPorts>

    VirtualHostName
    Name of the virtual host.

    ListOfPorts
    A comma-separated list of port aliases for the virtual host.

For example,

    run add-virtual-host MyVirtualHost 24,40000,50600

Create reserved work manager and sets max thread number to 10. run add-work-manager-reserved
Create work manager and set max thread number. run add-work-manager <name> <maxThread>

    name
    The Work Manager name.

    maxThread
    MaxThread for the work manager. Adds a Work Manager if it does not exist.

Enable application security. run enable-security <appName>

    appName
    Application name.

Configuration default values for activeUserRegistry, Authtype, AppSecurityEnablement, WIMuserRegistry, and mapping role to users.

Enable servlet and command caching for web container setting. run enable-servlet-caching

Enables servlet caching

For example, run enable-servlet-caching

Check whether the server1 is started by serverStatus command. run get-status
Reset the trace level to default (*=information). run reset-dynamic-trace-specification
Configure the database data source connection property. run set-connection-pool <JNDI name> <connectionTimeout> <maxConnections> <minConnections> <reapTime> <unusedTimeout> <agedTimeout> <purgePolicy>

    JNDI name
    JNDI name of the datasource.

    connectionTimeout
    Time in seconds connection request waits before timeout exception.

    maxConnections
    The maximum number of physical connections in this pool.

    minConnections
    The minimum number of physical connections in this pool.

    reapTime
    Time interval in seconds to start the pool maintenance thread.

    unusedTimeout
    Time in seconds after which discard an unused connection.

    agedTimeout
    Time in seconds before a physical connection is discarded.

    purgePolicy
    Policy to purge connections when a connection error is detected.

    For example, EntirePool or FailingConnectionOnly

Change trace level to passed trace level run set-dynamic-trace-specification <spec>

    spec
    The new logging trace specification.

Sets the trace specification

Change initialHeapSize and maximumHeapSize to specific 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 <name> <value>

    name
    JNDI Name.

    value
    JNDI Value.

Set JPA specification compliance level. run set-jpa-spec-level <level>

    level
    Specification compliance level.

Updates an existing server property or adds a server property. run set-server-property <propertyName> <propertyValue>

    propertyName
    property Name.

    propertyValue
    property Value.

For example, run set-server-property threshold 1800

Set SSL protocol for SSL setting. run set-ssl-protocol <sslProtocol>

    sslProtocol
    SSL protocol value. Valid values are are

    • SSL_TLSv2

    • TLS

    • TLSv1

    • TLSv1.1

    • TLSv1.2

    • SSL_TLS

    • SSL

    • SSLv2

    • SSLv3

Sets the alias of the certificate to use for the server. run set-ssl-server-alias <alias>

    alias
    The certificate alias for the server.

Change WebSphere Application Server data source properties (statement cache size) for specific data source. run set-statement-cache <jndi> <cacheSize>

    jndi
    JNDI name of the datasource.

    cacheSize
    Value for StatementCacheSize.

Set JVM custom property. run set-system-property <name> <value>

    name
    JVM System property name.

    value
    JVM System property Value.

Sets a JVM custom property

For example, run set-system-property SKIP_IDENTIFIER_CHECK true

Sets JVM custom property SKIP_IDENTIFIER_CHECK to true.

Sets new application thread pool properties. run set-thread-pool <threadName> <minSize> <maxSize> <inactivityTimeout> <isGrowable>

    threadName
    Thread name.

    minSize
    Minimum size.

    maxSize
    Maximum size.

    inactivityTimeout
    Thread inactivity timeout.

    isGrowable
    Determines whether the pool can grow. Valid values are true or false.

For example, run set-thread-pool webContainer 60 60 3000 false

Make trace.log and ffdc log generate to this directory. run set-trace-log-directory <directory>

    directory
    The location to write the logs.

Enable specific trace. run set-trace-specification <spec>

    spec
    The new logging trace specification.

Sets a web container property.

Add custom properties for web container setting (for example, HideSessionValues, httpOnlyCookies).

run set-webcontainer-property <name> <value>

    name
    Property name.

    value
    Property value.

For example, run set-webcontainer-property httpOnlyCookies WC_GENERIC_ACTIVITYDATA,WC_AUTHENTICATION_*

Change WebSphere Application Server administrator password. run update-admin-password <adminUser> <adminPassword>

    adminUser
    Name of the WebSphere Application Server admin.

    adminPassword
    New password for the WebSphere Application Server administrator.

Update all keystores that use the provided new password. run update-keystore-passwords <password> <new password>

    password
    The current password.

    new password
    The new password.

For example, run update-keystore-passwords aaa bbb

Update replication type of object cache instance if it exists. run update-objectcache-replicationtype <jndi> <type>

    jndi
    JNDI Name of the object cache we want to change.

    type
    Replication type of the object cache ['PULL, PUSH, PUSH_PULL, NONE']

For example, run update-object-cache dmap/PriceCachePUSH

If cache instance with JNDI name dmap/PriceCache exists, update replication type to PUSH.

Update the size of object cache instance if it exists. run update-objectcache-size <jndi> <size>

    jndi
    JNDI Name of the object cache.

    size
    New size of the object cache.

For example, run update-objectcache-size dmap/PriceCache 30000

If cache instance with JNDI name dmap/PriceCache exists, update cacheSize to 30000.

Update work manager setting if the work manager exists. run update-work-manager-thread <name> <minThreads> <maxThreads> <optional: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.

Deploy an ear to to was. run install-ear <transaction-server-ear-name>

    transaction-server-ear-name
    Name of the EAR file on the Transaction server.

Install OIDC application to the application server run time. run install-oidc <ear-name>

    ear-name
    EAR name of OIDC application.

Pass buildIdHost, clientId, clientSecrect parameters to configure OIDC for IBM ID run set-oidc-configuration <blueIdHost> <clientId> <clientSecret>

    blueIdHost
    The blue ID environment host name. Either 'prepiam.toronto.ca.ibm.com' for preproduction or 'idaas.iam.ibm.com' for production.

    clientId
    The client ID of the server is registered with an IBM ID endpoint.

    clientSecret
    The client secret for the Server to authenticate with an IBM ID endpoint.

Change JVM property (EncryptionKeysInSystemProperty, CurrentEncryptedMerchantKey, CurrentEncryptedSessionKey).

run set-encryption-keys merchantKey<sessionKey>

    merchantKey
    Encrypted merchant key.

    sessionKey
    Encrypted session key.

Change JVM property(wc.remote.kafka,wc.remote.kafka.topicPrefix, wc.remote.zookeeper, wc.store.remote.kafka,

wc.store.remote.kafka.topicPrefix)

run set-kafka-server <KafkaServers> <TopicPrefix> <ZookeeperServers>

    KafkaServers
    List of Kafka servers, separated by a comma.

    Kafka IDs must follow the pattern hostname:port.

    kafkaTopicPrefix
    Kafka Topic Prefix.

    listOfZookeeper
    List of ZooKeeper (zookeeperId1, zookeeperId2,.., zookeeperIdn) must be separated by comma. Zookeeper IDs must follow the pattern: <hostname:port>

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.cn.ibm.com 1414 FVT 15

IBM MQ server is test.cn.ibm.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.
    Default value is 300 seconds.

Update the datasource information in the wc-server.xml file. run update-wcserver-db <dbType> <dbHost> dbPort<dbname> <dbauser> <dbapassword> <dbuser> <dbpassword> [<nodeName>]

    dbType
    Database type. Set to db2.

    dbHost
    Database host name.

    dbPort
    Database port number.

    dbname
    Database name.

    dbauser
    Database admin user.

    dbapassword
    Database admin encrypted password.

    dbuser
    Database user.

    dbpassword
    Database encrypted password.

    nodeName
    The node name of the remote database[optional].

Set schedulerID. Works with schedulerCloneID.

run add-generic-jvmarg -Dcom.ibm.commerce.scheduler.SchedulerHostName=${schedulerID}

Set schedulerCloneID.

Works with schedulerID.

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

Create a WebSphere eXtreme Scale domain. run create-XS-Domain <hostname> <port>

    hostname
    The host name of the WebSphere eXtreme Scale catalog server.

    port
    The listener port of the WebSphere eXtreme Scale catalog server.

For WebSphere eXtreme Scale integration, connect the baseCache instance to WebSphere eXtreme Scale cache provider. run connect-basecache-wxs <size> <optional:gridName> <optional:mapName>

    size
    The new size of the default dynamic cache instance (baseCache).

    gridName
    (Optional) The name of the grid on the WebSphere eXtreme Scale server.

    mapName
    (Optional) The name of the map on the WebSphere eXtreme Scale server.

For WebSphere eXtreme Scale integration, connect the object cache instance to the WebSphere eXtreme Scale cache provider. Scale. run connect-objectcache-wxs <jndi> <size> <optional:gridName> <optional:mapName>

    jndi
    The JNDI name of the object cache.

    size
    The new size of the object cache instance.

    gridName
    (Optional) The name of the grid on the WebSphere eXtreme Scale server.

    mapName
    (Optional) The name of the map on the WebSphere eXtreme Scale server.


1The 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.