Using Quartz with Websphere and DefaultWorkManager - Websphere

This is a discussion on Using Quartz with Websphere and DefaultWorkManager - Websphere ; Hello, I am currently trying to use the open source API Quartz to run scheduled tasks in a Websphere environment. I read up on the issues of using Quartz and Websphere where threads could become unmanaged, and a solution is ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Using Quartz with Websphere and DefaultWorkManager

  1. Using Quartz with Websphere and DefaultWorkManager

    Hello,
    I am currently trying to use the open source API Quartz to run scheduled tasks in a Websphere environment. I read up on the issues of using Quartz and Websphere where threads could become unmanaged, and a solution is to use the default Work Manager from WAS as the Executor. I'm also using the Quartz Spring API to configure it via Spring. I have all this implemented fine.

    One issue I'm coming across is when I shutdown my application, I still see the DefaultWorkManager thread running in my IDE (I'm using RAD). The jobs themselves have shut down properly, but the DefaultWorkManager thread is still running. If I start back up my application, the running thread is again used.

    Shouldn't this thread be destroyed when the application shuts down? How can I do this using either the Quartz or CommonJ Work Manager API? If there is no way possible, is it damaging to have this DefaultWorkManager thread still run after the application has been shut down, if when it starts back up, it reuses that same thread?

    Any help would be greatly appreciated.

    Thank you,
    Russell Goldstein

  2. Re: Using Quartz with Websphere and DefaultWorkManager

    Work managers can be shared amongst applications, so the server cannot know when the threads should be stopped. Each work manager uses a thread pool, which is why the thread exists even if it has no work. There is no harm in having these thread continue to exist after the application stops and then be reused when the application restarts.

    That said, it should be possible to configure the thread pool of a work manager to have a minimum pool size of 0 (default is 1), which will cause the threads to eventually die off. I believe the keep-alive time (i.e., inactivity period) for work manager threads is 1 minute.

+ Reply to Thread