aspose file tools
The moose likes Servlets and the fly likes synchronize(getServletContext()) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "synchronize(getServletContext())" Watch "synchronize(getServletContext())" New topic
Author

synchronize(getServletContext())

Cameron Park
Ranch Hand

Joined: Apr 06, 2001
Posts: 371
Hi, I am puzzled by the implication of
synchronize(getServletContext()){}
What does it do...

William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12890
    
    5
It would ensure that only one Thread at a time could modify the ServletContext using that code.
Where did you see that?
Bill
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: synchronize(getServletContext())