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


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]

Reply via email to