Show TOC Start of Content Area

Component documentation Thread System  Locate the document in its SAP Library structure

Purpose

The J2EE Engine thread system is responsible for handling system and client threads. It comprises two managers – Thread Manager and Application Thread Manager. All threads in which J2EE Engine system operations are executed (core, services, and so on) use system threads supplied by the Thread Manager. Application Thread Manager supplies the threads in which the client application’s code is executed. When an HTTP request reaches the J2EE Engine, an application thread receives it.

Features

The separation of the thread system into application and system thread pools enables the J2EE Engine to sustain greater system load without disrupting its normal work:

        Application Thread Manager – handles client requests coming to the system. When a client request comes, the system tries to find a free thread in the Application Thread Manager and to start the execution of the request. If no free thread is available, the thread system buffers the request in a request queue. By buffering the threads and using them again, the system achieves better performance than using normal Java thread system without buffering. The Application Thread Manager runs only on server processes.

        Thread Manager – this thread pool is for system activities such as making backup, background optimizations for load/store data, and so on. The logic in the system thread manager is similar to the application logic – the system uses a queue for system requests if a free thread is not available.

With these two thread pools, the J2EE Engine saves resources for system requirements and prevents situations where there are too many clients that block the system. Additionally, it is very easy to set how many client threads can work in parallel on the system.

Resource Allocation

The thread system has the opportunity to reallocate the available resources. That is, according to the system loading, the available threads are dynamically allocated between the Thread Manager and the Application Thread Manager.

 

For more information about the J2EE Engine thread system configuration, see:

Configuring the Thread Pool

Configuring the Request Queue

Dynamic Allocation/Reallocation of Resources

 

 

End of Content Area