Possible Duplicate:
How can I shutdown Spring task executor/scheduler pools before all other beans in the web app are destroyed?
I am creating a website involving sessions and need to create a separate thread to run some tasks once a day. I also need it to shutdown when tomcat does and heard I could use the following code within web.xml:
<listener>
<listener-class>Thread</listener-class>
</listener>
The Thread class being referenced simply implements Runnable and performs various sleeps once ran. Does this code cater for the creation and destruction of such threads or are there better ways of doing such things?
Jon