• 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: 13064
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic