This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Servlets and the fly likes java.util.Timer & Servlets on App server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "java.util.Timer & Servlets on App server" Watch "java.util.Timer & Servlets on App server" New topic
Author

java.util.Timer & Servlets on App server

Jon Bricker
Greenhorn

Joined: Feb 28, 2003
Posts: 23
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

Joined: Mar 22, 2000
Posts: 13001
    
    5
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
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: java.util.Timer & Servlets on App server
 
It's not a secret anymore!