| Summary: | Support post event handling for CDOTransactionHandler | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Martin Fluegge <martin.fluegge> | ||||||
| Component: | cdo.core | Assignee: | Eike Stepper <stepper> | ||||||
| Status: | CLOSED FIXED | QA Contact: | Eike Stepper <stepper> | ||||||
| Severity: | enhancement | ||||||||
| Priority: | P3 | ||||||||
| Version: | 4.1 | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Martin Fluegge
Rebasing all outstanding 3.0 problem reports to version 3.0.1 Note that this is not possible in 3.0 maintenance! Sorry, forgot to set flag. Good that nothing slips your attention ;) Created attachment 173756 [details]
Patch v1
A first step. Not yet perfect.
Created attachment 173757 [details]
Test v1
And here the test. Also not yet perfect ;)
Moving all open enhancement requests to 4.1 Martin, do you still want this fix? It looks good to me. 2 issues, though: 1) Are you sure you want to implement CDOTransactionHandler? Or is the newer and reduced CDOTransactionHandler1 more adequate? 2) The test case fails. Please investigate. Honestly, I can't remember why I wanted to implement this. Whatever it was I must have workarounded it in Dawn. But having the flexibilty to react after the transaction handler has finished could be interesting for other. So yes, I think to look at this issue again would be worth the effort. Don't know the CDOTransactionHandler1 interface yet, but I'll check whether it would be better to use this interface. I'll have a look at this topic soon... This does not seem to be that easy. :( The problem come from the notification. Take the following scenario: you want to add an object to its container. From CDO site of view two operation are executed: 1.) the container is modified (modifying) 2.) that contained element is attached to the container (attaching) What happens now with the postEventHandler adapter is the following: First, the container is modified. This adds a MODIFIED_ADAPTER to the container and also (when CDO fires attaching on the transaction handler) a ATTACHED_ADAPTER to the contained child Then all adapters are fired on the object as for any eObject and the post adapter will be notified and removed afterwards. Until this point everything is ok. But when the inverseAdd operation is called for the child, no notification is send on this object, and the ATTACHED_ADAPTER remains inactive until the next operation on the object is performed. Not sure how to solve this or even really what causes this ;( commit 54f072db40982a486d25b1099872489b47371756 Closing. |