If you're not yet familiar with WorkManagers, well, it's time ! :)
With WLS 8, we had the concept of ExecuteQueues, replaced by workmanagers, starting with WLS 9. What's changed ?
Well, it's got self-tuning, allows a large number of SLA combinations and ... well, go read the official documentation about it :)
(Gush, I wanted to point towards E-docs, but it has been finally killed ... RIP ! I'll miss you)
So have a look at this good article instead.
Playing with the default workmanager
The default workmanager, as its name tells, is the workmanager defined by default.Thus, all applications deployed on WLS will use it.
One good thing is to first understand how they work, and then define some custom, matching the business rules or SLA you need.
But sometimes, when your application is already in production, it's obvious you can't take your EAR / WAR, update the deployment descriptor(s) and redeploy it.
(well, you could if your app isn't too big, thanks to side-by-side deployment, but that's another story)
But if you're interested, here's a live demo by my colleague Steve Button)
The default workmanager belongs to a threadpool.
As the initial threadpool comes with only five threads, that's not much.
If your application has to face a large number of hits, you may want to start with more than that.
Well, that's quite easy. You've got two ways to do so.
1) Modifying the config.xml
Just add the following line(s) in your server definition :
2) Adding some JVM parameters
Personally, that's my favorite option since I don't like when people go in a generated config file
and mess up with tags. If you're sure of what you're doing, that's ok, but it's safer the following way :
add the following option in your command line : -Dweblogic.threadpool.MinPoolSize=100
Observing the result
Personally, I decided to apply the change by adding the JVM parameter.
To do so, I just updated the startWeblogic script with the USER_MEM_ARGS line.
@REM WARNING: This file is created by the Configuration Wizard.
@REM Any changes to this script may be lost when adding extensions to this configuration.
call "%DOMAIN_HOME%\bin\startWebLogic.cmd" %*
Reboot WLS and see the option has been taken into account :
And finally :
Wasn't so hard, was it ? :)