File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

java.util.Timer & Servlets on App server

Jon Bricker

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?
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13036
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.
I agree. Here's the link:
subject: java.util.Timer & Servlets on App server
It's not a secret anymore!