|
|
|
[
Permlink
| « Hide
]
Lars Torunski - [01/Mar/05 05:59 PM ]
http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html
There is no locking at all. And I'm not suggesting to use the double-check algorithm. Straight syncronization is the only way to go here.
Simply synchronized getInstance method:
public synchronized static ServletCacheAdministrator getInstance(ServletContext context, Properties p) | |||||||||||||||||||||||||||||||||||||||