-
Threads and web container (5 messages)
- Posted by: Bill Pattchen
- Posted on: April 30 2007 05:45 EDT
Hi, I work on a web application which launches a thread when a user activates a given process. I would like to know if it is a good idea to run a thread in a web container. What are the impacts in terms of performance, scalability, resource management? Thanks.Threaded Messages (5)
- Re: Threads and web container by Jeryl Cook on May 01 2007 20:40 EDT
- Re: Threads and web container by Bill Pattchen on May 02 2007 04:04 EDT
-
Re: Threads and web container by Jeryl Cook on May 09 2007 12:14 EDT
-
Re: Threads and web container by Bill Pattchen on May 23 2007 04:29 EDT
- Re: Threads and web container by Lin Cao on September 16 2007 12:41 EDT
-
Re: Threads and web container by Bill Pattchen on May 23 2007 04:29 EDT
-
Re: Threads and web container by Jeryl Cook on May 09 2007 12:14 EDT
- Re: Threads and web container by Bill Pattchen on May 02 2007 04:04 EDT
-
Re: Threads and web container[ Go to top ]
- Posted by: Jeryl Cook
- Posted on: May 01 2007 20:40 EDT
- in response to Bill Pattchen
don't , don't ,don't (times 10). you should spawn threads from "user thread" servlet. I recommend you always spawn threads behind the scene outside the web tier where it can be more managed. -
Re: Threads and web container[ Go to top ]
- Posted by: Bill Pattchen
- Posted on: May 02 2007 04:04 EDT
- in response to Jeryl Cook
Thanks for your answer. But, "user thread" servlet is also in the web tier,isn't it? is it possible to start a thread outside the web tier from a web application? -
Re: Threads and web container[ Go to top ]
- Posted by: Jeryl Cook
- Posted on: May 09 2007 12:14 EDT
- in response to Bill Pattchen
i think i worded my response wrong, i basically mean, don't spawn threads that cannot be "managed" ...for example if you use Quartz(JDBC) the "Jobs"(threads), are maintained by the quartz/database. or of course if u are implementing EJBs, the message driven beans are managed by the J2EE application server. -
Re: Threads and web container[ Go to top ]
- Posted by: Bill Pattchen
- Posted on: May 23 2007 16:29 EDT
- in response to Jeryl Cook
thanks, it's clear now. -
Re: Threads and web container[ Go to top ]
- Posted by: Lin Cao
- Posted on: September 16 2007 00:41 EDT
- in response to Bill Pattchen
I'm confused now! I'm not sure whether a thread spawned from a servlet will run inside a web container or not,but i found the fact that the new thread(spawned from a servlet) can't locate the DataSource defined by the WAS Web Container,but the servlet itself(running inside the web container) can find it and use it!