wood burning stoves 2.0*
The moose likes Servlets and the fly likes ServletContext attributes and threading issues 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 » Servlets
Bookmark "ServletContext attributes and threading issues" Watch "ServletContext attributes and threading issues" New topic
Author

ServletContext attributes and threading issues

Krzysiek Hycnar
Ranch Hand

Joined: Jan 02, 2004
Posts: 74
Hi All,

I've got a question (possibly a lame one). Servlet context attributes in my app are set ONLY ONCE and that happens on the application startup. The question is if I can safely call ServletContext.getAttribute method without synchronizing it on the ServletContext object?? My guess is yes, but... it's just a guess

Regards
Chris
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: ServletContext attributes and threading issues
 
Similar Threads
Attributes, Session and ServletContext
SingleThreadModel
Who all can access HttpSession and/or its attributes ?
When ServletContext is initialized
Question on attributes