Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Teneo] Is it ready for GWT?
[Teneo] Is it ready for GWT? [message #718855] Thu, 25 August 2011 14:10 Go to next message
Giovanni Colasurdo is currently offline Giovanni ColasurdoFriend
Messages: 3
Registered: August 2011
Junior Member
Hi everyone.

I have an existent application based on RCP platform and using EMF, Teneo and Hibernate to persist data on relational database.
My company required me to bring the same application on the web.
So my attention have been focused on the possibility to use GWT because with EMF 2.7 version there is full support.
I re-generated all my model code setting GWT in genmodel runtime platform.
By my early tests and by reading some articles I realized that Teneo isn't fully supported in this kind of application.
Is it the truth? Can you confirm me?
Has someone else already worked with that configuration?
Am I forced to change architecture?

Thanks a lot.
(no subject) [message #718881 is a reply to message #718855] Thu, 25 August 2011 14:40 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
The problem is always the same you loose the lazy loading when you start
to serialize.

The easiest solution is to simply deploy your application as a RAP
because the no serialization has to happen.

Tom

Am 25.08.11 16:10, schrieb Giovanni Colasurdo:
> Hi everyone.
>
> I have an existent application based on RCP platform and using EMF,
> Teneo and Hibernate to persist data on relational database.
> My company required me to bring the same application on the web.
> So my attention have been focused on the possibility to use GWT because
> with EMF 2.7 version there is full support.
> I re-generated all my model code setting GWT in genmodel runtime platform.
> By my early tests and by reading some articles I realized that Teneo
> isn't fully supported in this kind of application.
> Is it the truth? Can you confirm me?
> Has someone else already worked with that configuration?
> Am I forced to change architecture?
>
> Thanks a lot.
(no subject) [message #718888 is a reply to message #718881] Thu, 25 August 2011 14:49 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
I have no experience in this environment either... I use the EMFT Texo project on the server side for web projects. My
vision (but always lack of time until now) is to implement json/xml serialization with CRUD webservices to integrate
with a client-side JS/GWT framework like extjs or smartclient.

gr. Martin

On 08/25/2011 04:40 PM, Tom Schindl wrote:
> The problem is always the same you loose the lazy loading when you start
> to serialize.
>
> The easiest solution is to simply deploy your application as a RAP
> because the no serialization has to happen.
>
> Tom
>
> Am 25.08.11 16:10, schrieb Giovanni Colasurdo:
>> Hi everyone.
>>
>> I have an existent application based on RCP platform and using EMF,
>> Teneo and Hibernate to persist data on relational database.
>> My company required me to bring the same application on the web.
>> So my attention have been focused on the possibility to use GWT because
>> with EMF 2.7 version there is full support.
>> I re-generated all my model code setting GWT in genmodel runtime platform.
>> By my early tests and by reading some articles I realized that Teneo
>> isn't fully supported in this kind of application.
>> Is it the truth? Can you confirm me?
>> Has someone else already worked with that configuration?
>> Am I forced to change architecture?
>>
>> Thanks a lot.
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
(no subject) [message #718915 is a reply to message #718888] Thu, 25 August 2011 15:35 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Martin,

Yes, to use Teneo in a GWT type of context you'd want to use Teneo on
the server side not on the client side. I.e., you'd use Teneo as a
replacement for the AppEngine stuff that the EMF GWT application uses
out of the box.


On 25/08/2011 7:49 AM, Martin Taal wrote:
> I have no experience in this environment either... I use the EMFT Texo
> project on the server side for web projects. My vision (but always
> lack of time until now) is to implement json/xml serialization with
> CRUD webservices to integrate with a client-side JS/GWT framework like
> extjs or smartclient.
>
> gr. Martin
>
> On 08/25/2011 04:40 PM, Tom Schindl wrote:
>> The problem is always the same you loose the lazy loading when you start
>> to serialize.
>>
>> The easiest solution is to simply deploy your application as a RAP
>> because the no serialization has to happen.
>>
>> Tom
>>
>> Am 25.08.11 16:10, schrieb Giovanni Colasurdo:
>>> Hi everyone.
>>>
>>> I have an existent application based on RCP platform and using EMF,
>>> Teneo and Hibernate to persist data on relational database.
>>> My company required me to bring the same application on the web.
>>> So my attention have been focused on the possibility to use GWT because
>>> with EMF 2.7 version there is full support.
>>> I re-generated all my model code setting GWT in genmodel runtime
>>> platform.
>>> By my early tests and by reading some articles I realized that Teneo
>>> isn't fully supported in this kind of application.
>>> Is it the truth? Can you confirm me?
>>> Has someone else already worked with that configuration?
>>> Am I forced to change architecture?
>>>
>>> Thanks a lot.
>>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: (no subject) [message #718931 is a reply to message #718915] Thu, 25 August 2011 15:58 Go to previous messageGo to next message
Giovanni Colasurdo is currently offline Giovanni ColasurdoFriend
Messages: 3
Registered: August 2011
Junior Member
Tom / Martin / Ed, thanks for your quick answers.

The GWT choice has been made because of 2 factors:
1. is an advice I was given by people here in Italy is constantly monitoring the world Eclipse, and that should be very familiar
2. was one of the requirements set by my company, especially in terms of the potential of the widgets in the construction of interfaces

Between the two proposals the best solution seems to be to take Texo, because in the section on future implementations of the wikipage is intended to fully support GWT, I ask: but in this case could I have troubles?
I also did not understand what the role of Teneo in Texo is; I apologize in advance if I ask a stupid question, I have chosen initially Teneo because it supports Hibernate: does Texo works only with EclipseLink?
Finally, not to insist, but to provide greater clarity to my earlier questions, I tried to understand the reason for this apparent incompatibility between GWT and Teneo and, if I carefully followed all the code in debug, the problem lies solely in the proper treatment of teneo required annotations in the ecore model: the first record "modelElement" is properly evaluated, the second containing "transient" fails and here follows a stack section:

...
...
Caused by: java.lang.UnsupportedOperationException
       at org.eclipse.emf.common.util.Reflect.isInstance(Reflect.java:70)
       at org.eclipse.emf.ecore.impl.EClassifierImpl.isInstance(EClassifierImpl.java:222)
       at org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.processAnnotatedModelElement(EAnnotationParserImporter.java:122)
       at org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.process(EAnnotationParserImporter.java:75)
       at org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.process(EAnnotationParserImporter.java:68)
       at org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingBuilder.buildMapping(PersistenceMappingBuilder.java:142)
       at org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingBuilder.buildMapping(PersistenceMappingBuilder.java:73)
       at org.eclipse.emf.teneo.hibernate.HbDataStore.mapEPackages(HbDataStore.java:1025)
       at org.eclipse.emf.teneo.hibernate.HbSessionDataStore.mapModel(HbSessionDataStore.java:192)
       at org.eclipse.emf.teneo.hibernate.HbSessionDataStore.initialize(HbSessionDataStore.java:98)
...
...


This only happens because the EMF porting on GWT hasn't the Teneo part, or for some other reason?

Thanks again.
Re: (no subject) [message #718948 is a reply to message #718931] Thu, 25 August 2011 16:11 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi,
Teneo and Texo are not related and do not share any code. Teneo adds logic to hibernate/eclipselink to make EMF
generated work with these ORM's.

Texo (server side) generates standard pojos (which work out of the box with any ORM, without runtime layer changes) and
a standard compliant orm.xml which should work with any JPA2 compliant ORM provider. The testcases are run against
EclipseLink but for a customer project I use the same generated orm.xml on hibernate and it works fine, other users also
use Texo on Hibernate, I know of one user who is using Texo in combination with Hibernate/Vaadin.

I am currently working on xml (de-)serialization with integration with the underlying ORM/JPA provider. See this page
which provides some info:
http://wiki.eclipse.org/Texo/ObjectStore

The next step is to make the xml serialization available as a set of CRUD web services. The main things have been done
(need to write testcases...).

And then I will use the same framework to implement json serialization which helps for web frameworks as extjs and
smartclient. The json (de-)serialization will use the same crud framework which I have done for xml. But this will be a
few months from now.

gr. Martin

On 08/25/2011 05:58 PM, Giovanni Colasurdo wrote:
> Tom / Martin / Ed, thanks for your quick answers.
>
> The GWT choice has been made because of 2 factors:
> 1. is an advice I was given by people here in Italy is constantly monitoring the world Eclipse, and that should be very
> familiar
> 2. was one of the requirements set by my company, especially in terms of the potential of the widgets in the
> construction of interfaces
>
> Between the two proposals the best solution seems to be to take Texo, because in the section on future implementations
> of the wikipage is intended to fully support GWT, I ask: but in this case could I have troubles?
> I also did not understand what the role of Teneo in Texo is; I apologize in advance if I ask a stupid question, I have
> chosen initially Teneo because it supports Hibernate: does Texo works only with EclipseLink?
> Finally, not to insist, but to provide greater clarity to my earlier questions, I tried to understand the reason for
> this apparent incompatibility between GWT and Teneo and, if I carefully followed all the code in debug, the problem lies
> solely in the proper treatment of teneo required annotations in the ecore model: the first record "modelElement" is
> properly evaluated, the second containing "transient" fails and here follows a stack section:
>
>
> ...
> ...
> Caused by: java.lang.UnsupportedOperationException
> at org.eclipse.emf.common.util.Reflect.isInstance(Reflect.java:70)
> at org.eclipse.emf.ecore.impl.EClassifierImpl.isInstance(EClassifierImpl.java:222)
> at
> org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.processAnnotatedModelElement(EAnnotationParserImporter.java:122)
>
> at org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.process(EAnnotationParserImporter.java:75)
> at org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.process(EAnnotationParserImporter.java:68)
> at org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingBuilder.buildMapping(PersistenceMappingBuilder.java:142)
> at org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingBuilder.buildMapping(PersistenceMappingBuilder.java:73)
> at org.eclipse.emf.teneo.hibernate.HbDataStore.mapEPackages(HbDataStore.java:1025)
> at org.eclipse.emf.teneo.hibernate.HbSessionDataStore.mapModel(HbSessionDataStore.java:192)
> at org.eclipse.emf.teneo.hibernate.HbSessionDataStore.initialize(HbSessionDataStore.java:98)
> ...
> ...
>
>
> This only happens because the EMF porting on GWT hasn't the Teneo part, or for some other reason?
>
> Thanks again.


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: (no subject) [message #718950 is a reply to message #718948] Thu, 25 August 2011 16:13 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Am 25.08.11 18:11, schrieb Martin Taal:
> Hi,
> Teneo and Texo are not related and do not share any code. Teneo adds
> logic to hibernate/eclipselink to make EMF generated work with these ORM's.
>
> Texo (server side) generates standard pojos (which work out of the box
> with any ORM, without runtime layer changes) and a standard compliant
> orm.xml which should work with any JPA2 compliant ORM provider. The
> testcases are run against EclipseLink but for a customer project I use
> the same generated orm.xml on hibernate and it works fine, other users
> also use Texo on Hibernate, I know of one user who is using Texo in
> combination with Hibernate/Vaadin.
>
> I am currently working on xml (de-)serialization with integration with
> the underlying ORM/JPA provider. See this page which provides some info:
> http://wiki.eclipse.org/Texo/ObjectStore
>
> The next step is to make the xml serialization available as a set of
> CRUD web services. The main things have been done (need to write
> testcases...).
>
> And then I will use the same framework to implement json serialization
> which helps for web frameworks as extjs and smartclient. The json
> (de-)serialization will use the same crud framework which I have done
> for xml. But this will be a few months from now.
>

How do you handle lazy-loading?

Tom
Re: (no subject) [message #718957 is a reply to message #718931] Thu, 25 August 2011 16:32 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Giovanni,

Comments below.

On 25/08/2011 8:58 AM, Giovanni Colasurdo wrote:
> Tom / Martin / Ed, thanks for your quick answers.
>
> The GWT choice has been made because of 2 factors:
> 1. is an advice I was given by people here in Italy is constantly
> monitoring the world Eclipse, and that should be very familiar
> 2. was one of the requirements set by my company, especially in terms
> of the potential of the widgets in the construction of interfaces
>
> Between the two proposals the best solution seems to be to take Texo,
> because in the section on future implementations of the wikipage is
> intended to fully support GWT, I ask: but in this case could I have
> troubles?
> I also did not understand what the role of Teneo in Texo is; I
> apologize in advance if I ask a stupid question, I have chosen
> initially Teneo because it supports Hibernate: does Texo works only
> with EclipseLink?
> Finally, not to insist, but to provide greater clarity to my earlier
> questions, I tried to understand the reason for this apparent
> incompatibility between GWT and Teneo and, if I carefully followed all
> the code in debug, the problem lies solely in the proper treatment of
> teneo required annotations in the ecore model: the first record
> "modelElement" is properly evaluated, the second containing
> "transient" fails and here follows a stack section:
>
>
> ..
> ..
> Caused by: java.lang.UnsupportedOperationException
> at org.eclipse.emf.common.util.Reflect.isInstance(Reflect.java:70)
> at
> org.eclipse.emf.ecore.impl.EClassifierImpl.isInstance(EClassifierImpl.java:222)
Models need to be generated to support GWT. One of the things this does
is produce reflection helpers that would make this work properly.
> at
> org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.processAnnotatedModelElement(EAnnotationParserImporter.java:122)
> at
> org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.process(EAnnotationParserImporter.java:75)
> at
> org.eclipse.emf.teneo.annotations.parser.EAnnotationParserImporter.process(EAnnotationParserImporter.java:68)
> at
> org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingBuilder.buildMapping(PersistenceMappingBuilder.java:142)
> at
> org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingBuilder.buildMapping(PersistenceMappingBuilder.java:73)
> at
> org.eclipse.emf.teneo.hibernate.HbDataStore.mapEPackages(HbDataStore.java:1025)
> at
> org.eclipse.emf.teneo.hibernate.HbSessionDataStore.mapModel(HbSessionDataStore.java:192)
> at
> org.eclipse.emf.teneo.hibernate.HbSessionDataStore.initialize(HbSessionDataStore.java:98)
> ..
> ..
>
>
> This only happens because the EMF porting on GWT hasn't the Teneo
> part, or for some other reason?
Yes.

I think the only appropriate way to make this stuff work is to use a
standard EMF runtime on the server with Teneo and all that good stuff
and have the GWT runtime on the client. But that's not how the
out-of-the-box stuff is set up so you'll need to do quite a bit of work
to figure out how to make that work. Sorry... :-(
>
> Thanks again.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: (no subject) [message #718972 is a reply to message #718950] Thu, 25 August 2011 16:44 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
This is all server side code where CRUD/REST requests are received and responses consists of json. References in the
json will for example be something like this:
order.businessPartner: '5'
order.businessPartner_title: 'My great business partner'
order.businessPartner_uri: 'http://asda#BusinessPartner||5'

it makes sense to also pass back the title/identifier of a reference so that it can be displayed in a grid without
loading the reference.

This will work fine with Smartclient which I know very well. The reference can also be resolved against a client side
datasource which will take care of loading references. But my experience with a complete webified ERP system is that
when you also return the identifier/title of a reference to the client that it is most of the time not necessary to
actually load the reference.

I have not studied the extjs approach in detail yet, but afaik they have a proxy concept for the client side code.

gr. Martin

On 08/25/2011 06:13 PM, Tom Schindl wrote:
> Am 25.08.11 18:11, schrieb Martin Taal:
>> Hi,
>> Teneo and Texo are not related and do not share any code. Teneo adds
>> logic to hibernate/eclipselink to make EMF generated work with these ORM's.
>>
>> Texo (server side) generates standard pojos (which work out of the box
>> with any ORM, without runtime layer changes) and a standard compliant
>> orm.xml which should work with any JPA2 compliant ORM provider. The
>> testcases are run against EclipseLink but for a customer project I use
>> the same generated orm.xml on hibernate and it works fine, other users
>> also use Texo on Hibernate, I know of one user who is using Texo in
>> combination with Hibernate/Vaadin.
>>
>> I am currently working on xml (de-)serialization with integration with
>> the underlying ORM/JPA provider. See this page which provides some info:
>> http://wiki.eclipse.org/Texo/ObjectStore
>>
>> The next step is to make the xml serialization available as a set of
>> CRUD web services. The main things have been done (need to write
>> testcases...).
>>
>> And then I will use the same framework to implement json serialization
>> which helps for web frameworks as extjs and smartclient. The json
>> (de-)serialization will use the same crud framework which I have done
>> for xml. But this will be a few months from now.
>>
>
> How do you handle lazy-loading?
>
> Tom


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Previous Topic:(no subject)
Next Topic:Element with empty(null?) namespace
Goto Forum:
  


Current Time: Fri Apr 19 20:14:48 GMT 2024

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

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

Back to the top