We use AIS JCA adapter to invoke Tuxedo service on Unix. During load testing, we found that calls to the same Tuxedo service seems to be serialized. We added a 5 seconds sleep code into a Tuxedo service which resulted in around 10 seconds elapsed time for the service call. When we ran 10 threads in the application server against this server it took something like 100 seconds instead of something like 10 seconds.

Our Tuxedo server is set up with the following definition:

ax_srv81 SRVGRP=GROUP1 SRVID=100
We tried all kinds of server modes and none of them helped. What gives?


First, let me assure you that the Attunity JCA adapter does not, by itself, serialize calls to the back-end (in this case, Tuxedo).

Experimenting with the setup of the Tuxedo server it appears that only one Tuxedo server process was started to handle requests (seen using tmadmin's psc or psr commands). This means that Tuxedo itself is serializing the requets. From the perspective of the Attunity JCA adapters, they all were blocked in a tpcall() to Tuxedo waiting in its queue.

Changing the Tuxedo configuration file to following:

ax_srv81 SRVGRP=GROUP1 SRVID=100 MIN=10 MAX=12
Resulted in the expected timing from the JCA adapter invocations. Of course the numbers here are just an example - each application must be provisioned according to its specifications and requirements. Always consult you application server documentation for the desired provisioning.

Proper provisioning is also required at the Attunity side for the same reasons. I’ll try to touch on that in the following answers.

>> I would still like to understand what SingleClient vs. MultiThreaded means in the Studio configuration of the adapter metadata

The Attunity daemon supports for following server models:
  • Single Client Server – a single-threaded server process is exclusively allocated for each JCA client connection (the pooled connection). Once the connection is finally released from the pool (the J2EE resource adapter connection pool) and the client disconnects, the server terminates.
  • Reusable Server – a single-threaded server processes are exclusively allocated to JCA client connection (for their lifetime). Once the connection if released from the pool, the server instance is placed in a server pool and is immediately ready to be allocated to a new JCA client connection.
  • Multi Client Server - single-threaded server process accepts multiple JCA client connections concurrently (numbers are configurable). It handles client requests serially so if some requests take long, the other client connections would starve. This mode is effective when the execution times are short and the connections are used in some random, not too close (on average) pattern.
  • Multi Threaded Server – a multi-threaded server process accepts multiple JCA client connections concurrently and handles them concurrently. This mode cannot always be used because of some limits of the providers the Attunity server calls.

In the case of Tuxedo (and other adapters) we recommend using the Reusable Server mode with nAvailableServer set to be equal to the expected number of concurrent Tuxedo service invocations and with a maxNActiveServer set to some capping value to prevent starving the operating system under stress.