Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Strange serialization behavior(EContainer References lost when EObject is used in a Remote Method Invocation)
Strange serialization behavior [message #893069] Mon, 02 July 2012 13:24 Go to next message
Sebastian Sprenger is currently offline Sebastian SprengerFriend
Messages: 10
Registered: January 2012
Junior Member
Hallo,

I needed to pass an EObject for a RMI. Therefore I had to nake my generated model classes implement java.io.Serializable. I managed that by creating a root interface called SerializableEObject extending EObject and Serializable. All my model Interfaces extend SerializableEObject. So far so good, I was able to pass the Objects.

Now comes the strange part:
My passed Object has a Containment Reference. Before passing the EObject the eContainer()-Method return the desired container Object. After the EObject is the eContainer-Reference is null. Is there a way to circumvent that?

Thanks for any help, Sebastian

Re: Strange serialization behavior [message #893076 is a reply to message #893069] Mon, 02 July 2012 13:43 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Sebastien,

EObjectImpl isn't marked serializeable, so I assume its fields aren't
being serialized. You'd need to implement specialized read/write logic
in your derived implementation classes...

On 02/07/2012 3:24 PM, Sebastian Sprenger wrote:
> Hallo,
>
> I needed to pass an EObject for a RMI. Therefore I had to nake my
> generated model classes implement java.io.Serializable. I managed that
> by creating a root interface called SerializableEObject extending
> EObject and Serializable. All my model Interfaces extend
> SerializableEObject. So far so good, I was able to pass the Objects.
>
> Now comes the strange part:
> My passed Object has a Containment Reference. Before passing the
> EObject the eContainer()-Method return the desired container Object.
> After the EObject is the eContainer-Reference is null. Is there a way
> to circumvent that?
>
> Thanks for any help, Sebastian
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[xcore] xml
Next Topic:[EMF .Edit] FeatureMapEntryWrapperItemProvider prepending feature name
Goto Forum:
  


Current Time: Thu Apr 25 17:24:42 GMT 2024

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

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

Back to the top