Thread Pools
TheJava Virtual Machine (JVM) can support many threads of execution at once. To help
performance,the Enterprise Server maintains one or more thread pools. It is possible to assign
specicthread pools to connector modules and to the ORB.
Onethread pool can serve multiple connector modules and enterprise beans. Request threads
handleuser requests for application components. When the server receives a request, it assigns
therequest to a free thread from the thread pool. The thread executes the client's requests and
returnsresults. For example, if the request needs to use a system resource that is currently busy,
thethread waits until that resource is free before allowing the request to use that resource.
Specifythe minimum and maximum number of threads that are reserved for requests from
applications.The thread pool is dynamically adjusted between these two values. The minimum
threadpool size that is specied signals the server to allocate at least that many threads in
reservefor application requests. That number is increased up to the maximum thread pool size
thatis specied.
Increasingthe number of threads available to a process allows the process to respond to more
applicationrequests simultaneously.
Avoidthread starvation, where one resource adapter or application occupies all threads in the
EnterpriseServer, by dividing the Enterprise Server threads into dierent thread-pools.
Thischapter contains the following topics:
“Workingwith Thread Pools” on page 164
16
CHAPTER 16
163