File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ServletContext attributes and threading issues
 
Similar Threads
Attributes, Session and ServletContext
SingleThreadModel
Who all can access HttpSession and/or its attributes ?
Question on attributes
When ServletContext is initialized