Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes BEA/Weblogic and the fly likes WorkManager vs ExecutorService Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "WorkManager vs ExecutorService" Watch "WorkManager vs ExecutorService" New topic
Author

WorkManager vs ExecutorService

manu chaox
Ranch Hand

Joined: Apr 10, 2006
Posts: 110
Hi,

I have tried to use the ExecutorService pool to run more download threads on weblogic application server 11 for my business application. It works. But I am interested in if it is good idea. I have a bit bad feeling that I should use Work Manager.

Is it good idea to use the ExecutorService or should I use the Work Manager from commonj and why ?

Thank you for any reply
anandraj tadkal
Ranch Hand

Joined: Feb 22, 2011
Posts: 98

The WorkManager feature in WebLogic Server is dynamic in nature, based on the number of incoming requests the thread pool size automatically re-sizes to maximize the throughput.

The WorkManager monitors throughput over time and based on history, determines whether to adjust the thread count. For example, if historical throughput statistics indicate that a higher thread count increased throughput, WebLogic increases the thread count. Similarly, if statistics indicate that fewer threads did not reduce throughput, WebLogic decreases the same.

Comparatively ExecutorService might yield a fixed sized pool. In that case spawning and closing of the threads has to be taken care by the code if the application server does not provide this feature out of the box.

You can follow the below link for a closer understanding of WorkManagers.

http://weblogic-wonders.com/weblogic/2010/11/21/understanding-the-work-managers/

Cheers,
Anandraj
http://weblogic-wonders.com

Regards,
Anandraj
http://weblogic-wonders.com
Follow us on facebook:
https://www.facebook.com/weblogicwonders
 
wood burning stoves
 
subject: WorkManager vs ExecutorService