Thursday, 8 August 2013

How to start a new thread when tomcat start

How to start a new thread when tomcat start

In a existing project, I want to start a new thread when tomcat starts. In
the new thread, I will do something like setup a timer and call web
service every 5 minutes.
I don't know where I can create this thread, and how to execute a method
inside the thread.
Is there a web.xml configuration for this? Or something else? Thank you.

No comments:

Post a Comment