|
Re: [CDO] Adapter does not receive RESOLVE notification [message #995145 is a reply to message #994966] |
Sat, 29 December 2012 07:19 |
|
Am 28.12.2012 19:39, schrieb Jack Lechner:
> Hello-
>
> I am in the process of migrating an existing EMF model from XML to CDO. I'm currently having a problem due to not
> receiving a Notification.RESOLVE at startup. Normally, the notification would be sent by the loading of the objects
> from the XML and this would trigger initialization methods that could only be run after the object was loaded.
>
> After reading this post (http://www.eclipse.org/forums/index.php/m/774303/#msg_774303), I enabled load notifications
> on my transaction (I use a single transaction for everything). I'm not sure if it affects anything but the object I'm
> having a problem with is a child of the object that is retrieved from the resource. I have the adapter attached as
> follows (to the child) and I never receive a notification when my object is loaded.
>
> public MyObjectImpl() {
> super();
> this.eAdapters().add(new Adapter() {
>
> @Override
> public void notifyChanged(Notification notification) {
> // initialization code
> }
>
> });
> }
>
> Hope you can help me out. Thanks in advance!
Took me some time to find out how the load notifications are supposed to work and I noticed that they're not being
dispatched for initial loads. I've fixed that with:
397232: Load notification missing for initial load
https://bugs.eclipse.org/bugs/show_bug.cgi?id=397232
I also noticed, that TOUCH notifications are being dispatched rather than the RESOLVEs you're suggesting. Your adapters
don't seem to test for that, though.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Powered by
FUDForum. Page generated in 0.04301 seconds