Show TOC Start of Content Area

Function documentation Tuning JMS Provider   Locate the document in its SAP Library structure

Use

Typically, the JMS features that J2EE Engine provides are used for application-level communication by the application components deployed on the server, such as enterprise beans, servlets or JSPs.

This procedure gives some guidelines about tuning JMS Provider Service.

Activities

To improve the performance of the JMS system, you can consider the following aspects:

·        Consumer buffers

For each message consumer the system stores messages that have not been consumed yet in a buffer. You can set the size of the buffer and the overall amount of memory allocated for consumer buffers using the JMS Provider Service properties clientConsumerBuffer and clientMemorySize respectively.

·        Destination agents number

You can set the number of destination agent threads that run simultaneously on a server process using the agentThreadCount property of JMS Provider Service. The destination agents deliver the messages from the relevant destination to its consumers. Note that the agent threads are a subset of the application threads configured for the server process; therefore, you should set a number that leaves enough free application threads for processing other requests. For more information about setting the application threads number, see Configuring the Thread Pool.

Since JMS Provider Service uses the underlying database layer to ensure the persistency of the messages, the overall performance of the JMS system is also related to the configuration of the database connection pool.

·        Destination queues

The destination agents buffer messages in a message queue. You can configure the size of this queue by the countLimitInMasterQueue and sizeLimitInMasterQueue properties of the JMS Provider Service. If the size of the message exceeds the size limit, only its header is stored in the queue. You can use the maxFetchSizeInMasterQueue property to configure the size of the data that is initially loaded when a destination is started.

·        Message lifetime

The expired and acknowledged messages are deleted from the database at certain intervals, which you can define by setting the cleanUpServiceSleepInterval property of JMS Provider Service. When the message exchange is intensive, you can decrease the value of this property to prevent the creation of a database file that is too large. To define the period for keeping the messages in the database after their expiration, you can set a messageExpirationDelta interval. Thus you can ensure that you do not delete messages that are still in memory.

·        Location of JMS transaction files

Each transacted session uses a unique file to store its incoming and outgoing messages and acknowledge requests. The property transactionStorePath is the location where the JMS transaction files will be stored. By default it is set to point to the home directory of the J2EE Engine installation. You must ensure that there is enough free space in that directory.

For more information about these settings, see JMS Provider Service.

 

End of Content Area