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. 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 status in mind, I've never had a problem, and I've done it quite a bit.

I think the prudent advice is "be careful". And, if you can do what you need to without spawning a thread, you might be saving yourself some trouble down the road. But, if you are careful and do it smartly, there isn't any definitive rule (that I am aware of) that says you can't do it.

Thom Hehl wrote:
Isn't there a caveat about spawning a new thread inside of a servlet?

Thom Hehl
Heavyweight Software for Heavyweight Needs
www.heavyweightsoftware.com

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to