File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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: 12682
    
    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 agree. Here's the link: http://aspose.com/file-tools
 
subject: java.util.Timer & Servlets on App server
 
Similar Threads
Scheduling EJB's to run at certain times
Bean initiating a JSP/Servlet?
Kick-off Java pgm when tomcat starts
EJB Timers in JBoss
Servlet code for updating data in database