| Author |
Thread Safety question
|
James Dekker
Ranch Hand
Joined: Dec 09, 2006
Posts: 215
|
|
What mechanism determines a servlet's thread safety? Is it the container or the implementation of the servlet class? Thanks again!
|
 |
D Rog
Ranch Hand
Joined: Feb 07, 2004
Posts: 471
|
|
|
An implementation of servlet classes.
|
Get power of your iPod with MediaChest | Minimal J2EE container is here | Light weight full J2EE stack | My blog | Co-author of "Windows programming in Turbo Pascal"
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
If you're not sure how to create a thread safe servlet, follow this basic rule of thumb: Don't create instance variables. You could still run into concurrency issues if your servlets or JSPs try to access a session or context scope object at the same time but instance variables are the leading cause of threading problems in servlet applications.
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
 |
|
|
subject: Thread Safety question
|
|
|