Every application server makes use of thread pool to serve client requests. Weblogic has an advanced mechanism to manage its threads named Work Manager. The Work Manager effectively allows your applications to run concurrently in multiple threads and create rules/guidelines to follow when assigning requests to threads.
At run-time, WebLogic Server uses these guidelines to connect the pending work/requests to execution threads. Each request in the execution queue has a sort of ranking which is determined by its priority.
The default Work Manager which ships with Oracle Weblogic distribution should be sufficient for most basic applications; however, mission critical applications might want to customize the default Work Manager configuration. Essentially, there are three types of Work Managers, each one characterized by its scope and usage rules. The three types are:
- The default Work Manager
- Global Work Managers
- Application-scoped Work Managers
Weblogic Default Work Manager
At the highest level, in order to handle its thread management and perform self-tuning, Weblogic uses the default Work Manager. This Work Manager is used by an application when no other Work Managers are specified in the application’s deployment descriptors. In most cases, the Default Work Manager will be just enough; you can however override its behavior by creating and configuring a Global Work Manager named “default” (see recipe “Creating a Work Manager”). This allows you to control the default thread-handling behavior of Weblogic Server.
Global Work Manager
Global Work Managers have the scope of the domain. You can create them in the WebLogic Administration Console (see recipe “Creating a Work Manager”). This kind of Work Manager will apply to all applicationsdeployed on the application server.
Application Scoped Work Manager
You can also create Work Managers at application level by specifying them in the following descriptors:
If you do not explicitly assign a Work Manager to an application, it uses the default Work Manager.
See the Section “Using Work Managers in your applications” to learn how to define and reference Work Managers in Weblogic deployment descriptors.