Search code examples
webspherewebsphere-6.1workmanagerscommonj

Programmatically create WorkManager on WAS 6.1


Is it possible to create a WorkManager from within a running application?

(will even accept hacks and/or non-public API:)

I have neither access to any deployment descriptor nor can I require any extra configuration in the deployment environment (like pre-configuring a workmanager).


Solution

  • So, As one of the authors of WorkManager in WAS.

    I think you'd be better off creating a stock WorkManager for generic use. Once thats created then while you can't make another WorkManager instance, you can put an Executor wrapper on it and make Executors as you wish.

    Chris wrote this article on wrapping a WorkManager with an Executor a couple of years back.

    http://www.ibm.com/developerworks/websphere/techjournal/0606_johnson/0606_johnson.html

    But, I'd be careful of creating more and more thread pools. You're likely better off reusing an existing pool. Too many threads is a bad thing in an application.