File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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?

André AS
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
SCJP Passed!! (93 %)
JTable Problem...
JWebplus : Question ID :1000056254950
Needs to throw an Exception if a Method exection takes More time
New to using a profiler .Please help