A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCA Java SE 8 Programmer I Study Guide 1Z0-808
this week in the
how to starts threads when servere starts up
Joined: Jun 11, 2009
Jun 19, 2009 06:31:50
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
Joined: Feb 27, 2009
Jun 19, 2009 08:02:23
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
of how to set it up in the web.xml.
I agree. Here's the link:
subject: how to starts threads when servere starts up
access Object in collection of Threads
threads are started when JVM starts
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015