• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Sybex: Context attribute thread safety

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Page:287

So in summary, we can say context attributes are fairly thread safe, because they are usually defined in web.xml file and most servers do synchronize the setAttribute(...) method.


Context attributes are defined in web.xml??? give me a break...besides being incorrect, I have never seen such a vague statement. So what is the answer, are they thread safe or not??? Should I assume that they are thread safe? or there is no such guarantee???
Can anybody please tell me what's the deal with the context attributes?
 
Ram Manglampalli
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the previous listing, the author has given a web.xml snippet showing some <context-param>s:
<context-param>
<param-name>databaseProtocol</param>
<param-value>jdbc: ...</param-value>
</context-param>
and a servlet code accessing it using context.getAttribute("databaseProtocol");
And all this is for the section which is supposed to teach me whether context ATTRIBUTES (not context parameters) are thread safe or not. What the hell is going on??? However calls this a typo is insane. The author has no idea what he/she is talking about.
reply
    Bookmark Topic Watch Topic
  • New Topic