Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Access EMF generated classes from JEE remote client
Access EMF generated classes from JEE remote client [message #638070] Tue, 09 November 2010 20:28 Go to next message
Patrick is currently offline PatrickFriend
Messages: 17
Registered: August 2010
Location: Rome
Junior Member
Hi All,

I have a probably silly question about a EMF usage scenario in a distributed JEE environment. Suppose I used EMF to generate Java classes from a XSD grammar; now I would like to use these classes also remotely, from a Java EE client application. The problem is that generated classes are not Serializable by default so I'm wondering if this scenario is somewhat supported by the framework and, if not, which is the recommended way to implement a usage scenario where generated domain model classes are of for both the server BL and the client UI

Thanks a lot for the clarification

Best Regards,
Patrick
Re: Access EMF generated classes from JEE remote client [message #638133 is a reply to message #638070] Wed, 10 November 2010 06:06 Go to previous messageGo to next message
Patrick is currently offline PatrickFriend
Messages: 17
Registered: August 2010
Location: Rome
Junior Member
Digging in bugzilla I found this bug:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=245014

so it appears that a plan to introduce support for Java serialization is on the table... but in the meantime? what do you think is the best approach to overcome this limitation ? could it make sense to use the XML/XMI serialization of EMF and transfer it (as a byte[]) on the wire ?

Thanks a lot for any suggestion

Regards,
Patrick
Re: Access EMF generated classes from JEE remote client [message #638271 is a reply to message #638133] Wed, 10 November 2010 14:59 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Patrick,

Even if that bug is addressed, I think it will be far more efficient to
serialize as XML. You could define a wrapper/container class that has a
reference to an EObject and specialize its serialization code so that
the whole containing resource is serialized as XML... If you're going
to transfer just bytes, you'd be way more efficient to use
BinaryResourceImpl.


Patrick wrote:
> Digging in bugzilla I found this bug:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=245014
>
> so it appears that a plan to introduce support for Java serialization
> is on the table... but in the meantime? what do you think is the best
> approach to overcome this limitation ? could it make sense to use the
> XML/XMI serialization of EMF and transfer it (as a byte[]) on the wire ?
> Thanks a lot for any suggestion
>
> Regards,
> Patrick


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Creating Children You Didn't Know Existed revisited
Next Topic:Explicitly storing default values in XML resources
Goto Forum:
  


Current Time: Fri Mar 29 09:05:18 GMT 2024

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

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

Back to the top