Posted on

Adding Capacity Constraints to your applications

oracle weblogic book oracle weblogic books

While the Max Threads Constraint is able to guarantee the maximum number of threads to be allocated, a Capacity constraint causes the server to reject requests when it has reached its capacity. Requests that are over the capacity constraint will result in a “503 error” code. You can configure a new Capacity Constraint from the Console or using Weblogic descriptors.

Here’s how to do it with the Oracle Weblogic Console:

1.       Select in the left Panel: Environment | Work Manager. Click on “New” and choose “Capacity Constraint”. The following screen will be displayed:

oracle weblogic book oracle weblogic books

2.       Enter a Name and a Count attribute, which determines the number of requests to be queued before issuing a 503 error code. Save your Capacity Constraint.

3.       Now move to your Work Manager Configuration tab and associate the Work Manager with the Capacity Constraint (formerly created) in the combo box:

oracle weblogic book oracle weblogic books