This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java.util.Timer & Servlets on App server

 
Jon Bricker
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to figure which form to ask this question...
I've not used the Timer before but I've gotten a question about using it on a servlet. That is not bad but the servlet will be deployed on an app server. I know that it normally not allowed to fiddle with threads on an app server but this would be in the web layer.
Basic question, would it be alright to use a Timer on a Servlet running in the Web container of an App Server?
thanks
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can certainly start other Threads such as might be used with a Timer - but you really need to think carefully about the architecture. Remember - a servlet may handle many simultaneious requests and (hopefully) the same servlet object will stay in use for weeks.
Bill
 
Tell me how it all turns out. Here is a tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!