| Author |
Thread.sleep in servlet?
|
Azrael Noor
Ranch Hand
Joined: Jul 29, 2010
Posts: 369
|
|
To keep track of application i have used multithreading in servlet as need was to run program on deploying, so contextlistener is used there. Some unexpected behaviors are facing in jboss 4.0
1) when thread run, it does not stop even server stopped or net beans is close.
2) during application startup servlet run, thread working fine. but when changes done to some class and redeploy is done it does not allow to deploy again.
3) Thread is very bad
Please solve the problem.
Thank you
|
Regards
Azrael Noor
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
What are you trying to achieve with this? Thread.sleep is a very questionable thing to want to be doing in a Servlet.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
Shanky Sohar
Ranch Hand
Joined: Mar 17, 2010
Posts: 1046
|
|
Why you are writing code in servlets,BecauseAs per MVC,
Writing code within a servlet is not a good practice,you must have to use the servlet as controller only
|
SCJP6.0,My blog Ranchers from Delhi
|
 |
 |
|
|
subject: Thread.sleep in servlet?
|
|
|