Application server considerations

Commerce+ Transaction Server is ultimately another Java 2 application that runs on top of Open Liberty Server. As a result, Open Liberty Server acts as the operating system for Commerce+ Transaction Server. Optimizing the application servers improves the performance of Commerce+ Transaction Server.

The Commerce+ Transaction Server Store, Search, and Customization servers use Open Liberty. Nearly all the performance tuning information can be found in the Open Liberty documentation (all topics by feature; monitoring and troubleshooting; tuning performance).

Key configuration areas in Open Liberty include:
  • Executor: Equivalent to the old tWAS web container thread pool. Configured in the server.xml file.
  • connectionManager: (equivalent to Datasource connection pool size). Configured in the datasources.xml file.
  • JVM generic parameters: should be tuned in the jvm.options file.
  • Command line options: Use the Open Liberty guide as a reference to the JVM parameters.

The following sections discuss performance tuning configurations specific to the Commerce+ Transaction Server. In your HCL Commerce+ Transaction Server development environment, these settings are organized into individual XML files (such as server.xml, datasources.xml, and concurrent.xml).

Important: Never edit XML files directly on the server. Always make changes inside your ts-openliberty workspace and deploy them following the steps in the Customizing Server Resources documentation.

Web Container thread connection pool

Web servers use many lightweight threads to handle large volumes of simple requests (like serving static images), but application servers process fewer, more complex, and longer-running requests.

Open Liberty Server uses a single, self-tuning default thread pool (Executor) for standard web requests. You can, however, manually set the pool's core (minimum) and maximum thread limits in your server configuration.

Increasing thread count does not automatically improve throughput or concurrency support. Excess threads force CPUs to waste time context-switching instead of doing work, while consuming memory and database connections unnecessarily. Conversely, setting the limit too low starves the Open Liberty Server, leaving CPUs underutilized.

If you override the self-tuning defaults, use these starting guidelines:

  • Set the maximum to at least 10 threads.

  • For multi-processor systems, start with 5 threads per CPU (e.g., 20 threads for a 4-core system).

  • Increase max threads only if you have spare CPU capacity for additional concurrent work.

  • Set the core (minimum) size equal to the maximum size to avoid the overhead of repeatedly creating and destroying threads.

To adjust the thread pool, follow the Customizing Server Resources guide to update the <executor> element in your server.xml file:
<executor coreThreads="50" id="default" maxThreads="50" name="Default Executor"/> 
When calculating your connection pool requirements in the following sections, factor in the threads defined here, along with:
  • Active schedule threads
  • Commerce+ Transaction Server key manager
  • Commerce+ Transaction Server audit
  • IBM MQ listeners
  • Other multi-connection threads in your custom code

Database connection pool

Note: The following sections describe how to allocate a large enough JDBC connection pool that no Commerce+ Transaction Server thread will have to wait for a connection. Alternatively, there is a Open Liberty Server Feature that allows Commerce+ Transaction Server to run with smaller JDBC connection pools.

In Commerce+ Transaction Server configurations, each active request thread generally requires its own database connection. Furthermore, if you use the Commerce+ Transaction Server Scheduler, you must reserve extra connections specifically for scheduler background threads.

An insufficient database connection pool blocks active threads from processing requests. This starves the application server’s CPUs, preventing full utilization and lowering overall throughput.

Data source connection pool size

When you consider the size of the connection pool, include the following items in your calculation to determine your total maxPoolSize:
  • Executor threads: The primary web container threads configured in your server.xml file. (e.g., 50 threads).
  • Managed Executor threads: Background jobs and scheduler tasks rely on work manager threads, which are configured via <managedExecutorService> elements in concurrent.xml file. These consist of five thread groups: four dedicated to the scheduler and one reserved for general Commerce+ Transaction Server tasks.
  • Commerce+ Transaction Server key manager: Uses one connection.
  • Custom Code: Any additional threads initiated by custom extensions that consume database connections.
The total connection pool size is the sum of the maximum numbers of threads across all configured thread pools (the Executor, Managed Executors, MQ listeners, etc.).
To update the database connection pool size:
  • Refer to the Customizing Server Resources documentation to locate your datasources.xml file.
  • Locate the <connectionManager> element within the HCLCommerceDS<dataSource> section.
  • Increase the maxPoolSize attribute to match the total number of connections added to your thread pools (executor or custom). For example:
    <dataSource id="HCLCommerceDS" ...>
        <connectionManager maxIdleTime="5m" maxPoolSize="55"/>
        ...
    </dataSource>

Deploy configuration updates to the server

Scheduler thread groups

In Open Liberty Server, Concurrency Utilities manage background tasks and scheduler thread groups (formerly called Work Managers), keeping them separate from the primary web container <executor>.

In Commerce+ environments, scheduler thread groups are configured via <managedExecutorService> elements within concurrent.xml file. Each <managedExecutorService> defines an isolated thread pool (such as default, broadcast, or inventory).

Key properties to configure:

  • concurrencyPolicy max: Specifies the maximum number of concurrent threads permitted for that particular scheduler pool.

To view or edit the maximum threads for a scheduler group:
  • Open the concurrent.xml file by following the steps in the Customizing Server Resources documentation.

  • Find the target service element (for example, <managedExecutorService id="default" ...>).
  • Set the max value in <concurrencyPolicy max="5"/> to your updated thread target.
  • Deploy the updated file to the server.

Prepared statement cache

While Open Liberty Server reports a 10%–20% performance improvement from prepared statement caching, the sheer volume of SQL statements in Commerce+ Transaction Server requires hands-on tuning rather than relying solely on automated monitoring.

To find the optimal cache size, conduct performance testing under controlled, reproducible workloads.

Initial Setup & Tuning:

  1. Start with a baseline setting of 150.
  2. Increase the size in increments of 50 until throughput levels off.

Configuring the Prepared Statement Cache Size:

  1. Refer to Customizing Server Resources and open datasources.xml file.
  2. Find the HCLCommerceDS<dataSource> definition.
  3. Update or add the statementCacheSize attribute on the <dataSource> tag. Example:
    <dataSourceid="HCLCommerceDS"statementCacheSize="150"...><!-- properties --></dataSource>
  4. Deploy your changes to the server.