| Author |
Making context attribute thread safe...
|
ankur rathi
Ranch Hand
Joined: Oct 11, 2004
Posts: 3829
|
|
What I got from reading HFS&J is, There is only one way to make context attribute thread safe, where ever we are using context (setting and getting attrubute in context) in whole web application, do that in synchronized block. Other than this, there is no way to make sure... Am I right? Thanks.
|
 |
Pradeep bhatt
Ranch Hand
Joined: Feb 27, 2002
Posts: 8876
|
|
Yes you are right.
|
Groovy
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
This topic is currently being discussed here as well: http://www.coderanch.com/t/361561/Servlets/java/ServletContext-setAttribute-always-Synchronization
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
ankur rathi
Ranch Hand
Joined: Oct 11, 2004
Posts: 3829
|
|
Thanks Pradip and Ben.
|
 |
 |
|
|
subject: Making context attribute thread safe...
|
|
|