On HEAD org.jasig.portal.layout.dlm.RDBMDistributedLayoutStore in the methods:
getFragmentLayoutCopies()
initializeFragmentCleaner()
getUserLayout() getStructureStylesheetUserPreferences()
getThemeStylesheetUserPreferences()
there is a broken double checked locking idiom:
if ( ! initialized )
{
synchronized( initializationLock )
{
if ( ! initialized )
{
initializationLock.wait();
}
}
}
For more info about double checked locking see:
http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html
Also, in getThemeStylesheetUserPreferences() the first if test seems to be missing a "!" and the block would only be entered if initalized was already true.
if ( initialized )
{
synchronized( initializationLock )
{
if ( ! initialized )
{
initializationLock.wait();
}
}
}