[ http://issues.apache.org/jira/browse/TUSCANY-859?page=comments#action_12455346 ] Kelvin Goodson commented on TUSCANY-859: ----------------------------------------
Capturing some info on this. I think Yang's patch fixes the specific test case, but there may be more to this, and we should consider performance. EMFhas a method "summarize" which calls consolidateChanges and this refreshes caches. There are 2 other caches -- we need to check if these are similarly affected. I think we need to be making judicious calls to summarize(), bearing performance in mind. > ChangeSummary#isCreated cache is not updated while changes are still going on > ----------------------------------------------------------------------------- > > Key: TUSCANY-859 > URL: http://issues.apache.org/jira/browse/TUSCANY-859 > Project: Tuscany > Issue Type: Bug > Components: Java SDO Implementation > Affects Versions: Java-Mx > Reporter: Yang ZHONG > Attachments: 859.patch > > > This Test Case uses simple.xsd from tuscany/java/sdo/impl/src/test/resources, > however it's a *generic* issue, not specific to simple.xsd. > child = quote.createDataObject("quotes"); > assertTrue(changeSummary.isCreated(child)); > child = quote.createDataObject("quotes"); > assertTrue(changeSummary.isCreated(child)); > The last assertion fails. > ChangeSummary#isCreated delegates to *derived* getObjectsToDetach() > caching which improves performance. > However, the cache should be updated while changes are still going on. > I have browsed the spec 2.1draft and 2.01, they don't seem forbid users from > querying ChangeSummary before endLogging(). > One of the possible solutions is to invalidate cache whevever there's a new > change, such as > public void SDOChangeRecorder#notifyChanged(Notification notification) > { > cachedObjectsToDetach = null; > super.notifyChanged( notification); > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
