Isn't there a caveat about spawning a new thread inside of a servlet?
Thom Hehl
Heavyweight Software for Heavyweight Needs
www.heavyweightsoftware.com
--
In every revolution, there is one man with a vision.--Jerome Bixby
: Saturday, January 14, 2006 1:03 PM
To: Tomcat Users List
Subject: Spawning a thread
Isn't there a caveat about spawning a new thread inside of a servlet?
Thom Hehl
Heavyweight Software for Heavyweight Needs
www.heavyweightsoftware.com
--
In every revolution, there is one man with a vision
Most of the time people will tell you don't do it, but don't get any
more specific than that. Generally-speaking, spawning a thread to
process a request is somewhat of a bad idea because the container is not
responsible for managing the thread and therefore you run some extra
risks
-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 14, 2006 1:20 PM
To: Tomcat Users List
Subject: Re: Spawning a thread
risks. But, if you have something like a background process
that isn't
tied to a request, with the caveat
Subject: Re: Spawning a thread
risks. But, if you have something like a background process
that isn't
tied to a request, with the caveat the other poster made about daemon
A good way of starting threads not tied to a request is to have a context
listener class start the threads
Just to clarify, George wasn't talking about a context listener
thread. I suppose there *technically* is such a thing, but what he was
referring to is spawning a thread *from* a context listener. Subtle
semantic difference, but it completely changes the meaning :)
Frank
Thom Hehl wrote
From: Thom Hehl [mailto:[EMAIL PROTECTED]
Subject: Re: Spawning a thread
Can you point me to some documentation about context listener
threads?
Context listeners are classes, not threads. The servlet spec is the
definitive doc, but there's not a great deal of how-to in there:
http