Is a TimerTask a Thread? Reason I ask is this. I'm creating a TimerTask to execute some code on a daily basis. AND is the TimerTask outside of the Servlet container. If it is, what kind of TimerTask like object can I create so it is INSIDE of the web container?
By failing to prepare, you are preparing to fail.<br />Benjamin Franklin (1706 - 1790)
It doesn't look like this solution provides me with a way of scheduling a task that will occur within a web container. I'm looking for something that I can control by restarting my web container. This way its safe for the company.
I didn't read the article, but was there something in it that said "You can't use a Timer in a web container"? Because you can use a Timer in a web container. Maybe you just didn't see an explicit example of doing that? If you want to start a Timer when a web application starts up, then you could do so in the contextInitialized() method of a ServletContextListener.
Originally posted by Dale DeMott: It doesn't look like this solution provides me with a way of scheduling a task that will occur within a web container. I'm looking for something that I can control by restarting my web container. This way its safe for the company.
What did you see in there that leads to to believe that this couldn't be done from within a web container? A web container is a Java app.
You could certainly embed either solution (quartz or java.util.timer) into a context scoped object that gets instanciated via a contextListener. There are some things to watch out for (daemon vs non-daemon threads, etc..) but these are typical issues when starting your own threads from within a webapp.
[KLUNK!!] [ May 18, 2006: Message edited by: Ben Souther ]
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