This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JBoss/WildFly and the fly likes how to starts threads when servere starts up Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "how to starts threads when servere starts up" Watch "how to starts threads when servere starts up" New topic
Author

how to starts threads when servere starts up

varaprasad mutyala
Greenhorn

Joined: Jun 11, 2009
Posts: 17
hi,

In my application i am using threads that process some commands,

these threads need to be run always, so

i need to start these threads when server starts up.

any help greatly appriciated
Benjamin Hiner
Greenhorn

Joined: Feb 27, 2009
Posts: 12
You can have a servlet context listener. This would run anytime the server is started or reloaded (hot deployed) as long as it was in the web.xml.

Here is an example of how to set it up in the web.xml.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to starts threads when servere starts up