Databases Reference
In-Depth Information
Tuning the application thread concurrency
with custom work managers
In the previous recipe, the default work manager was created to limit the concurrency
of all applications deployed in the PROD_Cluster cluster.
In this recipe, a new custom work manager myWebServiceWM will be created, with
a maximum thread constraint named myWebServiceMaxThreads, configured with 20,
and a capacity constraint of 20 as well.
The myWebServiceWM will be associated with the myWebService.war application so
only the concurrency for the requests of this application will be limited to 20 threads per
Managed Server.
Getting ready
The work manager will be defined in the Administration Console. The application also must
update a descriptor in order to be associated with the new work manager.
How to do it...
First create the myWebServiceMaxThreads maximum threads constraint and the
myWebServiceWM work manager in the Administration Console:
1. Access the Administration Console with your web browser at http://adminhost.
domain.local:7001/console .
2. Click on the Lock & Edit button to start a new edit session.
3. Expand the Environment tree on the left and then click on Work Managers.
4. Click on the New button then select the Maximum Threads Constraint radio button.
Click on the Next button.
5. Type myWebServiceMaxThreads in the Name text field and 20 in the Count text
field. Click on the Next button.
6. Select the All servers in the cluster radio button from the PROD_Cluster
option and click on the Finish button.
7. Click on the New button and select the Capacity Constraint radio button.
8. Type myWebServiceCapacityConstraint in the Name field and 20 in the Count
field. Click on the Next button.
9. Select the All servers in the cluster radio button from the PROD_Cluster option and
click on the Finish button.
10. Click on the New button again and select the Work Manager radio button. Click on
the Next button.
 
Search WWH ::




Custom Search