Martin Taal's Blog

About EMF, Teneo, CDO, Texo, Hibernate, Open-Source ERP and other topics

EMFT Texo: different from EMF code generation?

with 14 comments

Texo is an EMF variant which provides real pojo/JPA entity generation from ecore/xsd models.

The main difference with EMF is that the generated code does not contain any framework specific constructs. The code can be serialized, persisted etc. in standard frameworks (EclipseLink, Hibernate, GWT) without additional layers. This in contrast to EMF which for example requires a solution like Teneo at runtime to take care of persistence in Hibernate.

Still, eventhough Texo follows a different solution path than EMF, much of the same functionality is supported:

Different from EMF, Texo supports this functionality by externalizing the framework specific constructs in separate generated (optional) classes. The generated entities are not ‘polluted’ with framework constructs.

In addition to the above Texo also adds new features not provided by EMF:

Texo is targeted at the server side of web server/service environments. The current development focuses on extending the Texo runtime with generated REST XML/XMI webservices.

Thanks for reading and if you are interested feel free to give feedback or ask questions on the EMFT newsgroup or forum.

gr. Martin

Written by martintaal

December 6, 2011 at 10:40 am

Posted in Texo

14 Responses

Subscribe to comments with RSS.

  1. Could you point to a Get started Tutorial ??


    December 6, 2011 at 1:19 pm

  2. Hi

    I’m having trouble generating my capua.ecore model, see

    I right clicked the *.ecore model, selected Texo -> Generate Model Code , but only * and * were generated. I didn’t notice any errors.

    Kari Hirvi

    January 18, 2012 at 4:20 pm

    • Hi,
      I tested it with your model and with me it worked fine. Can you check the error view to see if something is shown there?

      gr. Martin


      January 18, 2012 at 5:07 pm

      • Thanks for prompt reply. for you. I looked at the eclipse error log, nothing there (deleted the log and run the generation again).
        My texo version is
        EMFT Texo SDK (Incubation) 0.1.0.v201112171308


        Kari Hirvi

        January 18, 2012 at 5:44 pm

  3. I mean the error view in eclipse, can you check if you see anything there?

    gr. Martin


    January 18, 2012 at 6:39 pm

    • Hmm, in Indigo eclipse from “Window -> Show View” I can only find “Error Log”, is this what you meant?
      Sorry for not being specific enough, earlier I referred to that error view (or log), nothing there.


      Kari Hirvi

      January 18, 2012 at 6:55 pm

  4. Hmm, yes that’s the one I mean, really strange that you only get the 2 classes, you are using the same ecore version I downloaded from the net an hour ago?
    What is the content of the 2 classes? Maybe it is easiest if we continue on the EMFT newsgroup, there you can attach files.

    gr. Martin


    January 18, 2012 at 6:58 pm

  5. Hi,

    I liked what Texo could do for me in regard to serialization. But I want it to me more EMFey. Is there some way where I can get both the framework (Texo, EMF) benefits together ?

    Background: I have a eclipse based product which deals with EMF models. And I have a database where the models will be serialized. So I want to use EMF framework for my modeling needs (adapter, notifier, etc) plus the Texo’s capability to serialize my model to a database.

    Is there someway where I could get this working ?



    May 6, 2013 at 6:34 am

    • Hi,
      Yes this can be done and is also a good architectural approach. See this blog post:

      So on the UI side you use EMF generated objects with adapter/notifier, on the server side you use Texo objects in a standard j2ee/tomcat/jetty servlet environment.

      gr. Martin


      May 6, 2013 at 8:18 am

      • Thank you for the reply and the post.

        But in the case as explained in the post, I will at any time have two set of model classes. Firstly the java files generated by EMF which will be used for the RCP UI. Secondly the set of .java files used explicitly for serialization to database. Is my understanding correct ?

        If so, how will i ensure that the data contained in the EMF object model is consistent with the Texo generated data object model. Kindly excuse if I am being very naive.



        May 6, 2013 at 11:58 am

      • Hi,
        No problem, you are correct that you will have 2 sets of generated code. The code is different because their purpose is very different (one for the ui, the other for persistence). Keeping them aligned is a manual task. But regenerating the code after a model change is quite easy (a few mouseclicks).

        Note that you can let texo automatically regenerate the source code when ever you change the ecore model. So then you only need to explicitly regenerate the EMF code when the model changes.

        gr. Martin


        May 6, 2013 at 2:49 pm

  6. Thanks Martin for the help


    May 10, 2013 at 4:51 am

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: