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 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]