| Author |
Thread and Web Applications
|
Rudra Narayan Garnaik
Ranch Hand
Joined: May 05, 2006
Posts: 39
|
|
Hi All,
Please share your points whether it is good to use thread on web applications?
- If NO/YES, then why so?
Many thanks in advance.
|
Regards, Rudra Narayan
www.garnaik.com
|
 |
Wouter Oet
Saloon Keeper
Joined: Oct 25, 2008
Posts: 2700
|
|
|
You shouldn't use Threads in any application. You should prefer Executor and ExecutorService instead. They decouple the threading details away.
|
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
|
 |
Rudra Narayan Garnaik
Ranch Hand
Joined: May 05, 2006
Posts: 39
|
|
Thanks for your reply.
Executor and ExecutorService : I will check it. Is it not using Thread?
Nice got some idea to have a look.
|
 |
Chris Hurst
Ranch Hand
Joined: Oct 26, 2003
Posts: 370
|
|
Look up J2EE work manager ...
The idea is you create units of work (I mainly work at the moment in Glassfish previously I used Weblogic and I've included some WebSphere info at the end) . Obviously it still results in threads but they are managed / pool'ed by your container and configuration can be exposed by your container.
WorkManager
Just google it for loads of info ...
WorkManager Info
|
"Eagles may soar but weasels don't get sucked into jet engines" SCJP 1.6, SCWCD 1.4, SCJD 1.5,SCBCD 5
|
 |
 |
|
|
subject: Thread and Web Applications
|
|
|