History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: UP-1452
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Brad Johnson
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
uPortal

RDBMDistributedLayoutStore.getFragmentLayoutCopies() and other methods use broken double checked locking idiom

Created: 02/Mar/06 01:30 PM   Updated: 25/Sep/06 10:56 AM
Component/s: Distributed Layout Management (DLM)
Affects Version/s: 2.5.2 RC1, 2.5.3 RC1, 2.5.2 GA, 2.5.3 RC2, 2.5.3 RC3, 2.5.3 GA
Fix Version/s: 2.5.4

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
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();
                }
            }
        }

 All   Comments   Work Log   Change History   FishEye      Sort Order:
There are no comments yet on this issue.