[CDO] Adapter not notified just after model change on invalidation [message #910916] |
Mon, 10 September 2012 12:04  |
Eclipse User |
|
|
|
Hi Eike,
While working on my solution to have remote changes integrated in a EMFT
Transaction (See https://bugs.eclipse.org/bugs/show_bug.cgi?id=323792 )
I have met a exception in case a remote user remove in a list the second
element before the remove of the first and commit, the user receiving
the remote changes get the following exception :
org.eclipse.emf.common.util.AbstractEList$BasicIndexOutOfBoundsException: index=1,
size=0
at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:338)
at
org.eclipse.emf.ecore.change.util.ChangeRecorder.handleFeature(ChangeRecorder.java:445)
at
org.eclipse.emf.ecore.change.util.ChangeRecorder.notifyChanged(ChangeRecorder.java:267)
at
org.eclipse.emf.transaction.impl.TransactionChangeRecorder.notifyChanged(TransactionChangeRecorder.java:218)
at
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:380)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dispatch(NotificationChainImpl.java:104)
at
org.eclipse.emf.common.notify.impl.NotificationChainImpl.dispatch(NotificationChainImpl.java:92)
at
org.eclipse.emf.internal.cdo.view.CDOViewImpl.sendDeltaNotifications(CDOViewImpl.java:972)
at
org.eclipse.emf.internal.cdo.view.CDOViewImpl.doInvalidate(CDOViewImpl.java:837)
at
org.eclipse.emf.internal.cdo.view.CDOViewImpl$InvalidationRunnable.run(CDOViewImpl.java:1577)
at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:26)
at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:1)
at
org.eclipse.net4j.util.concurrent.QueueWorker.doWork(QueueWorker.java:86)
at org.eclipse.net4j.util.concurrent.QueueWorker.work(QueueWorker.java:77)
at
org.eclipse.net4j.util.concurrent.Worker$WorkerThread.run(Worker.java:206)
To respect the contract (as in local with XMIResource) of having
adapters notified just after model change, the invalidation should be
refactored to notify adapters at each remote change integration.
Best Regards.
|
|
|
|
Re: [CDO] Adapter not notified just after model change on invalidation [message #911363 is a reply to message #911342] |
Tue, 11 September 2012 09:01  |
Eclipse User |
|
|
|
Hi Eike,
I have created https://bugs.eclipse.org/bugs/show_bug.cgi?id=389173 ,
thanks for your feedback.
Cheers.
On 11/09/2012 14:21, Eike Stepper wrote:
> Am 10.09.2012 18:04, schrieb Esteban Dugueperoux:
>> Hi Eike,
>>
>> While working on my solution to have remote changes integrated in a
>> EMFT Transaction (See
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=323792 ) I have met a
>> exception in case a remote user remove in a list the second element
>> before the remove of the first and commit, the user receiving the
>> remote changes get the following exception :
>>
>> org.eclipse.emf.common.util.AbstractEList$BasicIndexOutOfBoundsException:
>> index=1, size=0
>> at
>> org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:338)
>> at
>> org.eclipse.emf.ecore.change.util.ChangeRecorder.handleFeature(ChangeRecorder.java:445)
>>
>> at
>> org.eclipse.emf.ecore.change.util.ChangeRecorder.notifyChanged(ChangeRecorder.java:267)
>>
>> at
>> org.eclipse.emf.transaction.impl.TransactionChangeRecorder.notifyChanged(TransactionChangeRecorder.java:218)
>>
>> at
>> org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:380)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dispatch(NotificationChainImpl.java:104)
>>
>> at
>> org.eclipse.emf.common.notify.impl.NotificationChainImpl.dispatch(NotificationChainImpl.java:92)
>>
>> at
>> org.eclipse.emf.internal.cdo.view.CDOViewImpl.sendDeltaNotifications(CDOViewImpl.java:972)
>>
>> at
>> org.eclipse.emf.internal.cdo.view.CDOViewImpl.doInvalidate(CDOViewImpl.java:837)
>>
>> at
>> org.eclipse.emf.internal.cdo.view.CDOViewImpl$InvalidationRunnable.run(CDOViewImpl.java:1577)
>>
>> at
>> org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:26)
>> at
>> org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:1)
>> at
>> org.eclipse.net4j.util.concurrent.QueueWorker.doWork(QueueWorker.java:86)
>> at
>> org.eclipse.net4j.util.concurrent.QueueWorker.work(QueueWorker.java:77)
>> at
>> org.eclipse.net4j.util.concurrent.Worker$WorkerThread.run(Worker.java:206)
>>
>>
>> To respect the contract (as in local with XMIResource) of having
>> adapters notified just after model change, the invalidation should be
>> refactored to notify adapters at each remote change integration.
> That's probably not the smallest imaginable change in CDO but I vaguely
> remember that this has already been discussed somewhere. Can you please
> submit a bugzilla?
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04971 seconds