client-side synchronization (or lack thereof)

Jay Shaughnessy jshaughn at redhat.com
Wed Dec 22 15:15:12 UTC 2010


yes, of course.  was counting on Christmas magic for this to actually 
work.  Most likely the false positive was due to running in dev mode.  
I'll revisit now...  The problem is an interesting one, though, and 
something for people to keep in mind.  The user can continue to 
manipulate enabled widgets while the async call to the server is in 
progress.

On 12/22/2010 1:30 AM, Joseph Marques wrote:
> On 12/21/2010 05:16 PM, Jay Shaughnessy wrote:
>>    modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardView.java |   37 ++++++++--
>>    modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/PortletWindow.java |    3
>>    2 files changed, 34 insertions(+), 6 deletions(-)
>>
>> New commits:
>> commit a2619e9946f686fdb50f161df01766d88964980f
>> Author: Jay Shaughnessy<jshaughn at redhat.com>
>> Date:   Tue Dec 21 17:14:28 2010 -0500
>>
> ...
>>       I've protected add/remove portlet using some synchronization but it we need
>>       to go further we may need to put a locking mechanism in place.
>    From the "Multithreading and Synchronization" section here --
> http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsCompatibility.html
>
> "JavaScript interpreters are single-threaded, so while GWT silently
> accepts the synchronized keyword, it has no real effect.
> Synchronization-related library methods are not available, including
> Object.wait(), Object.notify(), and Object.notifyAll(). The compiler
> will ignore the synchronized keyword but will refuse to compile your
> code if the Object's related synchronization methods are invoked.
>
> So this either needs to be remedied by disallowing further actions
> (i.e., disabling buttons) until the first one completes, or by
> persisting the individual dashboard delta (instead of the entire set of
> portlets for the dashboard being modified) which would remove the race
> condition.
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/rhq-devel
>


More information about the rhq-devel mailing list