This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes About Threads Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "About Threads" Watch "About Threads" New topic

About Threads

André Asantos
Ranch Hand

Joined: Nov 23, 2009
Posts: 234
About Threads... Could I use into any Java web project?
Nilesh Miskin
Ranch Hand

Joined: Jun 17, 2010
Posts: 44
In a web environment, most of the multithreading is handled by the Container. Once the servlet is loaded, the container forks a new thread to handle a new request.
The important thing we should be talking about is how to avoid ill-effects of concurrent access in a web environment by means of proper design & appropriate synchronization mechanisms wherever applicable.

Nilesh Miskin
David Newton

Joined: Sep 29, 2008
Posts: 12617

According to the spec, we're not supposed to do any "local" thread management--but we do it all the time, often via something like Quartz.
It is sorta covered in the JavaRanch Style Guide.
subject: About Threads
Similar Threads
JWebplus : Question ID :1000056254950
SCJP Passed!! (93 %)
Needs to throw an Exception if a Method exection takes More time
New to using a profiler .Please help
JTable Problem...