you can make use a static property of a class to hold a reference to a
singleton of the thread pool.
You should take a look to the stuff at java.util.concurrent, there are some
nice queues and other thread safe and concurrent safe stuff, like queues
with multiple producers and consumers, in different threads.

Si quieres ser más positivo, pierde un electrón
Miguel Ruiz Velasco S.


On Wed, Sep 3, 2008 at 23:43, Zoran Avtarovski <[EMAIL PROTECTED]>wrote:

> I¹m trying to implement a simple thread pool model (Java 1.4) for a
> telemetry application.
>
> I¹m getting up to speed with threads but I haven¹t been able to find any
> examples of setting a thread pool in a server/servlet environment.
>
> I have a number of remote units which upload telemetry data for processing
> via http and receive instructions via the response. The instructions aren¹t
> dependent on the results of data processing. At present I fire off a new
> thread to process the data for each unit, but it makes sense the best
> approach would be to have a fixed pool of threads and then add the data to
> a
> queue which is processed by the pool of threads.
>
> It¹s setting up the initial pool that I¹m a little unclear about. Do I
> setup
> a Threadpool servlet and set it to load on startup and store the pool in
> the
> application scope?
>
> Any advice or pointers to some good information would be appreciated.
>
> Z.
>

Reply via email to