GeeCON Prague 2014*
The moose likes Tomcat and the fly likes Confuguring tomcat to Run Thread at rgular intervals of Time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Tomcat
Bookmark "Confuguring tomcat to Run Thread at rgular intervals of Time" Watch "Confuguring tomcat to Run Thread at rgular intervals of Time" New topic
Author

Confuguring tomcat to Run Thread at rgular intervals of Time

ivin jacob
Greenhorn

Joined: Apr 05, 2006
Posts: 23
Hi,

I have an appplication which needs to create and upddate RSS Xml at reglar intervals of time.

Creating the XML is done.

Now i need to run this bunch of code to create th XML at regular intervals of time. Can some one help me how to configure Tomcat to run it as a Thread
at tomcat start up and at regular intervals

I am using JDK6,tomcat6,JSF,ROME(for RSS).
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42039
    
  64
You could use a ServletContextListener that sets up those threads using the java.util.Timer and TimerTask classes in its contextInitialized method.


Ping & DNS - my free Android networking tools app
 
GeeCON Prague 2014
 
subject: Confuguring tomcat to Run Thread at rgular intervals of Time