You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Ron Gavlin (JIRA)" <tu...@ws.apache.org> on 2007/08/06 23:07:59 UTC

[jira] Resolved: (TUSCANY-1508) ChangeSummaryImpl.getOldValues(DataObject) use of cachedSDOObjectChanges Map is not thread-safe

     [ https://issues.apache.org/jira/browse/TUSCANY-1508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ron Gavlin resolved TUSCANY-1508.
---------------------------------

       Resolution: Duplicate
    Fix Version/s: Java-SDO-Next

This is a duplicate of TUSCANY-1006 which I will re-open.

- Ron

> ChangeSummaryImpl.getOldValues(DataObject) use of cachedSDOObjectChanges Map is not thread-safe
> -----------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1508
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1508
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-Next
>            Reporter: Ron Gavlin
>            Priority: Critical
>             Fix For: Java-SDO-Next
>
>
> Invoking ChangeSummaryImpl.getOldValues(DataObject) from multiple threads results in a HashMap.get(Object) infinite loop. Here is the stack track:
> HashMap.get(Object) line: 323
> ChangeSummaryImpl.getOldValues(DataObject) line: 581
> ...
> The problem appears to be that the protected cachedSDOObjectChanges HashMap has no synchronization. Normally, synchronizing this type of collections class instance is not the most performant solution to this type of problem. However, based on the way this map is used within this class, I think synchronizing the HashMap is a reasonable, straight-forward solution. Here is my proposed change:
> OLD:
> protected HashMap cachedSDOObjectChanges = new HashMap();
> NEW
> protected Map cachedSDOObjectChanges = Collections.synchronizedMap(new HashMap());
> Thoughts?
> - Ron

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org