This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
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 Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "synchronize(getServletContext())" Watch "synchronize(getServletContext())" New topic


Cameron Park
Ranch Hand

Joined: Apr 06, 2001
Posts: 371
Hi, I am puzzled by the implication of
What does it do...

William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13018
It would ensure that only one Thread at a time could modify the ServletContext using that code.
Where did you see that?
I agree. Here's the link:
subject: synchronize(getServletContext())
It's not a secret anymore!