Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Adapter not notified just after model change on invalidation
[CDO] Adapter not notified just after model change on invalidation [message #910916] Mon, 10 September 2012 16:04 Go to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
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 #911342 is a reply to message #910916] Tue, 11 September 2012 12:21 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
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


Re: [CDO] Adapter not notified just after model change on invalidation [message #911363 is a reply to message #911342] Tue, 11 September 2012 13:01 Go to previous message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
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
>
>
Previous Topic:[CDO] CDOResources being EObjects confuses some APIs
Next Topic:Sort classes in ecorediag editor's outline view
Goto Forum:
  


Current Time: Sat Apr 27 03:37:20 GMT 2024

Powered by FUDForum. Page generated in 0.02987 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top