| Access EMF generated classes from JEE remote client [message #638070] |
Tue, 09 November 2010 15:28  |
Patrick 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 #638271 is a reply to message #638133] |
Wed, 10 November 2010 09:59  |
Ed Merks Messages: 24553 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
|
|
|
Powered by
FUDForum. Page generated in 0.03491 seconds