Hi.

> Could you please describe it a bit more in detail? How do you avoid
> deleting a record that is not yet saved?

Yes, sure.
I have implemented the following, and it solves the scenario I originally 
mentioned.
The idea is to do something like this in SharedItemStateManager.Update.end()

persistMgr.store(shared);
List addedProps = buildListOfAddedProps(shared);
dataStore.removeTransientIdentifiers(addedProps);
...

Where addedProps has the DataIdentifier's of the properties in the 
ChangeLog.addedStates() 
collection.

And in DatabaseDataStore.removeTransientIdentifiers() the last modified time of 
each of those 
properties is updated, and its entry in the inUse weak hash map is removed (I 
know it's weak, but I 
prefer to delete it myself).

For this to be prettier, I think some changes should be done. For example, the 
way the persistence 
manager gets a reference to the data store (I added a parameter so far). 
Another thing is obtaining 
the DataIdentifier from a PropertyState/PropertyImpl is quite involved. There 
should be an internal 
interface or something like that for this job.

Regards,

Esteban Franqueiro
[EMAIL PROTECTED] 


Notice:  This email message, together with any attachments, may contain 
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated 
entities,  that may be confidential,  proprietary,  copyrighted  and/or legally 
privileged, and is intended solely for the use of the individual or entity 
named in this message. If you are not the intended recipient, and have received 
this message in error, please immediately return this by email and then delete 
it.

Reply via email to