Issue:
How to setup work manager to increase the thread limit for RPM.
I used below steps to configure it for my local instance, that worked..
We will need to
create this work manager ahead of time in Weblogic, perform the steps
below and then re-deploy so it gets that modified XML file in updated
deployment.
For Retail J2ee app 13.2.x on weblogic,
- Run
XDoclet to generate deployment descriptors if building locally
Do NOT run XDoclet again or the changes to the deployment descriptors will be overwritten and will need to be redone - Open
weblogic-ejb-jar.xml for editing
- For
each MDB reference add the following entry inside the<weblogic-enterprise-bean> element:
<dispatch-policy>threading_workmanager</dispatch-policy>
The
result should look something like this:
<weblogic-enterprise-bean>
<ejb-name>app_nameTaskMDB</ejb-name>
<message-driven-descriptor>
<destination-jndi-name>jms/Queue_name</destination-jndi-name>
</message-driven-descriptor>
<reference-descriptor>
</reference-descriptor>
<dispatch-policy>threading_workmanager</dispatch-policy>
</weblogic-enterprise-bean>
- Now
open the Weblogic Server Admin Console
- Navigate
to Environment > Work Managers
- Select
New, then select 'Maximum Threads Constraint', and click Next
- Enter
a name for the constraint, set the count to the maximum number of desired
threads, and then select Next
- Under
Servers select the app server that you would like to deploy the constraint
to, most likely AdminServer, and select Finish
- Now,
select New, then select 'Minimum Threads Constraint', and click Next
- Enter
a name for the constraint, set the count to the minimum number of desired
threads, and then select Next
- Under
Servers select the app server that you would like to deploy the constraint
to, most likely AdminServer, and select Finish
- Now,
select New, then select 'Work Manager', and click Next
- The
name of the work manager should match the one given for the
dispatch-policy element in weblogic-ejb-jar.xml ('threading_workmanager'
in the example above)
- Under
Servers select the app server that you would like to deploy the constraint
to, most likely AdminServer, and select Finish
- From
the list select the new Work Manager
- Open
the drop down menu for 'Minimum Threads Constraint' and select the minimum
threads constraint that was just created in the previous steps
- Open
the drop down menu for 'Maximum Threads Constraint' and select the maximum
threads constraint that was just created in the previous steps
- Select
Save
Restart
the server, rebuild and redeploy the application