Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9253321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:11:25+00:00 2026-06-18T11:11:25+00:00

We are using Websphere Work Manager (CommonJ) for spawning threads in our application. We

  • 0

We are using Websphere Work Manager (CommonJ) for spawning threads in our application. We are making use of the default WorkManager and through JNDI accessing it in our application.

try {  
    Context ctx = new InitialContext();  
    wm = (WorkManager) ctx.lookup("java:comp/env/wm/App_WORKMANAGER");  
    wm.schedule(this);  
    //threadScheduler = new Thread(this);  
    //threadScheduler.start();  
} catch (Exception e) {  
    // catch the exception  
} 

We keep running the threads which listens to different queues to check for any message and process it. We do get hung messages as below , came to know this can be configured from admin console to stop showing the warning/error or increase the hung detection time.

[1/30/13 6:50:38:708 EST] 00000032 ThreadMonitor W WSVR0605W: Thread “WorkManager.DefaultWorkManager : 2” (00000022) has been active for 708969 milliseconds and may be hung. There is/are 1 thread(s) in total in the server that may be hung.

Now if we stop the application from admin console, these thread don’t get stopped and we keep getting the Hung messages. For another deployment another set of threads adds up to the Hung thread count.
I read somewhere that if we declare thread as Daemon then they get stopped (). So is it fine that we declare the threads as Daemon as below or we need to override the release() method too? Our release() is empty as of now.

public boolean isDaemon() {                        
  return true;  
}  

public void release() {  
 //TODO  
}

How exactly can we stop the application thread from running once the application is stopped? It’s an old application using Struts 1.x.

I read two explanation here:

  1. Thread keeps running even after application has been stopped in Websphere (as I’m not using spring, just declaring Deamon is fine? And this will work if we stop the JVM itself, just stopping app from console wont help, correct?)

  2. Does Websphere respect Daemon threads? (the approach suggested by Sarel Botha is the only solution or we have some setting from console to get the job done.)

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T11:11:26+00:00Added an answer on June 18, 2026 at 11:11 am

    Yes, in your use case the isDaemon method should return true and you need to implement the release method in such a way that it stops the code executing in the run method of the Work object. If you do this, then the hanging thread warnings will disappear, and WebSphere will call release on all running Work objects when the application is stopped.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using a commonj.work.WorkManager to process a few queries in parallel. I have
We are using WebSphere 6.1 application server with default classloader delegation mode i.e. PARENT-FIRST
I started developing a portlet based application using WebSphere Portal and now I am
I've noticed that both ways of looking up a DataSource using JNDI work: jdbc/DataSource
I am Using WebSphere Application Server 7.0.0.25, Myfaces 2.0.7, Primefaces 3.4.1 I have the
I am using Websphere Application Server to create a typical web application where UI
I have a C application running on AIX 6.1 using Websphere MQ 6. The
I'm using IBM RAD as the IDE and Websphere Application Server v6.0 to deploy
Background: I use Spring 3.0.x in my Websphere 7 applications to grab the CommonJ
I am using websphere 7. to deploy my application. While deployment it needs to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.