Posted on

Creating Request Class for your WorkManagers

oracle weblogic book oracle weblogic books

A Request class expresses a scheduling guideline that WebLogic Server uses to allocate threads to requests. Request classes help ensure that high priority work is scheduled before less important work, even if the high priority work is submitted after the lower priority work. There are three types of Request classes you can apply to your modules:

  • Fair Share Request Class: Specifies the average thread use-time required to process requests. The default is 50.
  • Response Time Request Class: Specifies a response time goal in milliseconds.
  • Context Request Class: Assigns request classes to requests based on context information.


You can configure a new Request Class from the Console or using Weblogic descriptors.

Let’s see how to create a Response Goal and associate it with your Work Manager configuration:

1.       Select in the left Panel: Environment | Work Manager and click on “New”. Now choose the Request class that you want to create (for example a Response Time Request class).

2.       In the next screen, enter the Request class Name and the Response Goal desired, as depicted by the following picture:

oracle weblogic book oracle weblogic books

3.       Now you can select your Request class in your Work Manager Configuration, by selecting the Request class Combo Box. Alternatively, clicking on the “New” button will let you define a new Request Class:

oracle weblogic book oracle weblogic books

Response time goals are not applied to individual requests. Instead, WebLogic Server computes a tolerable waiting time for requests with that class by subtracting the observed average thread use-time from the response time goal, and schedules requests so that the average wait for requests with the class is proportional to its tolerable waiting time.

For example, if ModuleA has a Response Time Goal of 500 ms and ModuleB has a Response Time Goal of 1000 ms, even if the actual average response times for ModuleA and ModuleB might be higher or lower than the response time goals, it will be a common fraction or multiple of the stated goal. So, if the average response time for ModuleA requests is 1,000 ms., then the average response time for ModuleB requests is 2,000 ms.