Martin Taal's Blog

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

EMF Teneo: Auditing it All!

leave a comment »

Hi,

One feature missing from Teneo (until now!) was auditing, storing object state over time and allowing you to retrieve the historical state of objects. The past weeks I worked on this nice feature and currently all/most 500 Teneo testcases are run in audit mode.

The auditing functionality provides some nice functionality:

  • auditing can be enabled/disabled for the complete model or for specific types
  • possible to navigate/iterate over the history of an object
  • possible to query for version history using HQL

Teneo auditing generates an audit model from the domain model and creates separate tables to store the audit information. All/most Ecore model constructs are supported.

There are several options available to control the auditing behavior. In addition you can annotate the domain model with JPA annotations to control the auditing database schema. This is all described in some more detail here.

Teneo provides different ways to get to the audited data, you can retrieve the audit history for a single object, use HQL querying or iterate over the history.

I am now working on integrating Teneo auditing with the CDO Hibernate Store. Allowing the user to retrieve revisons through the CDO revision api. More on that in my next post!

I hope this post is useful for you, thanks for reading and if you are interested feel free to give feedback or ask questions on the EMF newsgroup or forum.

gr. Martin

Written by martintaal

November 27, 2012 at 2:11 am

Posted in Teneo

EMF Texo and Teneo available for Maven

leave a comment »

Hi,

Traditionally Teneo and Texo are distributed through Eclipse update sites. The past year several people have asked me to make the Texo and Teneo runtime jar files also available through a Maven repository.

Recently this topic also came up for some sponsored Teneo development I am currently doing. With these requests from multiple sides it was time to make this happen!

So from today: Teneo/Texo (and their EMF dependencies) are uploaded to the Sonatype repositories (thank you Sonatype for providing this repo-service!) and from there synced to Maven central. They are all published in the org.eclipse.emf group.

The nightly builds are available on the Sonatype snapshot repository. The builds are released regularly to Maven central. You can find the jar files there:

See these Texo and Teneo wiki pages for some more information.

Thanks for reading and I hope this blog post helps to give Teneo and Texo a try. Let me know if you have any questions or remarks on the EMF/EMFT newsgroup or forum!

gr. Martin

ps: when using maven with Texo, make sure to check out this troubleshooting tip.

Written by martintaal

November 2, 2012 at 6:27 am

Posted in Teneo, Texo

EMFT Texo: integrating Texo in your build process

with one comment

Hi!

The latest Texo version supports headless/server code generation directly from Java or ANT. This makes it possible to integrate Texo code generation in your overall build process.

So how to setup headless/build-integrated code generation?

Texo uses Eclipse for code formatting and import resolving. So, start by downloading an Eclipse version suitable for your build platform. Then install the Texo plugins in this Eclipse version through the Texo update site and put this Eclipse version somewhere on your build server.

As a second step choose a location on the build server where Texo can create a workspace and Java project. And last, place the model (ecore/xsd) files on the build server.

To generate code using ANT you can use a macrodefinition. To run the macro:

<texo.gen eclipse=”/home/build/eclipse”

data=”/home/build/workspace”

projectName=”testgen”

modelLocation=”/home/build/models”

jpa=”true” dao=”false”/>

The parameters have the following meaning:

  • eclipse: the eclipse installation location
  • data: the workspace location
  • projectName: the name of a Java project to use, see here for more information
  • modelLocation: the location of the model files
  • jpa: generate code with JPA annotations
  • dao: generate a DAO layer

The generated code will be present in the Java project on your build server and can be copied/compiled from there.

Instead of using ANT, you can also execute headless code generation directly in Java.

That’s all, with these latest developments, code generation and your build process can be nicely tied together!

Thanks for reading and I hope this blog post helps to give Texo a try. Visit the Texo wiki for more information. Let me know if you have any questions or remarks on the EMFT newsgroup or forum!

gr. Martin

Written by martintaal

October 21, 2012 at 9:25 pm

Posted in Texo

EMFT Texo: using xtend2 for faster generation

with 2 comments

Hi!

A month back a Texo user asked me on the newsgroup about the speed of Texo code generation. His proposal was to use xtend2 as the template technology as it is much faster. As often with proposals and ideas, it takes a while, but then suddenly, motivation and time come together and coding starts.

So from today Texo as a default uses xtend2 as a templating technology. This indeed gives a considerable speed increase!

The nice thing is that I managed to still keep the great feature of allowing overriding and/or extending of templates within a development project. You can do this using xpand templates. So the base standard part of Texo uses fast xtend2, if you want to override/extend you use xpand. This is also nice for backward compatibility as your current xpand overriding/extending templates will work fine!

Thanks for reading and I hope this blog post helps to give Texo a try. Visit the Texo wiki for more information. Let me know if you have any questions or remarks on the EMFT newsgroup or forum!

gr. Martin

Written by martintaal

October 12, 2012 at 10:02 pm

Posted in Texo

Taking EMF to the third tier: the Texo JSON Resource

leave a comment »

Hi!

After supporting a 2-tier architecture it is now time to make the step to a full 3-tier application architecture for EMF based RCP’s connected to  a standard JPA web server. The server side of this 3-tier architecture was already done earlier: the Texo JSON web service layer. The only remaining topic was implementing the client side: an EMF resource which talks JSON with the server.

Well a first version is available now: the JSONTexoResource. This resource uses JSON to communicate with a server with JPA entities generated from ecore models using Texo.

The nice thing is that the JSONTexoResource transparently works with EMF Proxies. So EMF proxies are automatically resolved by sending a HTTP request to the server and getting the content of the object.

It is easy to override Texo code to add authentication support to the HTTP communication layer. An additional nice feature is that the server side can change/update objects when they are being persisted. Server-side changes are send back to the client (executing the persist action) and merged with the client side objects.

The Texo Resource also support loading objects using queries, counting, retrieving and refreshing individual objects (from the server) and cross-reference queries.

For more information:

  • specifics on the JSONTexoResource can be found here
  • for setting up the server side is check out this wiki page or see this video.

Thanks for reading and I hope this blog post helps to give Texo a try. Visit the Texo wiki for more information. Let me know if you have any questions or remarks on the EMFT newsgroup or forum!

gr. Martin

Written by martintaal

August 30, 2012 at 12:21 am

Posted in Texo

EMF CDO HibernateStore: Upgraded to Teneo 2.0, JPA 2.0 and Hibernate 4.1

leave a comment »

In a previous post I talked about Teneo 2.0 and its JPA 2.0 and Hibernate 4.1 support. With these new developments it was time to upgrade the CDO Hibernate store also. So here it is: the CDO Hibernate Store in the CDO 4.1 release/build now also supports JPA 2.0 and Hibernate 4.1. This new functionality is available from CDO 4.1 RC1 or any nightly build from the 21th of May 2012.

Hibernate 4.1 is a major release and it is not binary compatible with 3.6.0. This means that when getting the latest CDO Hibernate store 4.1 version you also need to upgrade Hibernate to 4.1, and if you are testing using hsqldb then make sure to also upgrade that one.

To help you out, the newer hibernate and hsqldb versions are available through this update site:

http://www.elver.org/eclipse/2.0.0/update

The CDO Hibernate Store 4.1 depends on Teneo 2.0 which you can find on this update site:

http://download.eclipse.org/modeling/emf/teneo/updates/2.0.0/interim/

I hope this post is useful for you, thanks for reading and if you are interested feel free to give feedback or ask questions on the EMF newsgroup or forum.

gr. Martin

Written by martintaal

May 23, 2012 at 4:54 am

Posted in CDO

EMF Teneo 2.0: JPA 2.0 and Hibernate 4.*!

with 3 comments

The time has come to up the version number of Teneo from 1.2.0 to 2.0.0. The ‘technical’ reason is support for Hibernate 4.* which has a different internal api than previous versions. At the same time it is nice to announce another new feature: JPA 2.0 annotation support (see the JPA 2.0 spec). Teneo already supported the JPA 1.0 specification and the JPA EntityManager api.

The JPA 2.0 annotation development has been made possible by the sponsorship of an active Teneo user-company. It is great to see that there are companies out there who appreciate what we do at the Eclipse Modeling group and specifically ofcourse Teneo!

JPA 2.0 annotations can be defined in-the-model as well as in a separate xml file.

To summarize Teneo is now available in 2 actively maintained versions:

1.2.0:

  • JPA 2.0
  • Hibernate 3.6/EclipseLink 2
  • EMF 2.6 and 2.7
  • Eclipse Helios

2.0.0:

  • JPA 2.0
  • Hibernate 4.1
  • EMF 2.7 – 2.8
  • Eclipse 3.7 and further

Note the JPA 2.0 support is available in the latest build of both versions of Teneo, the main difference between the 2 versions is the supported Hibernate version.

Active development of new features is done in the 2.0.0 version, but bugs/issues will be actively fixed in 1.2.0 for the foreseeable future.

I am currently upgrading CDO Hibernate Store to Teneo 2.0.0, that should be finished soon to!

For more information on dependencies and how to get these new versions, visit the Teneo wiki download & install page. This page also lists the update site with the latest Hibernate and hsqldb plugins.

I hope this post is useful for you, thanks for reading and if you are interested feel free to give feedback or ask questions on the EMF newsgroup or forum.

gr. Martin

Written by martintaal

May 21, 2012 at 3:54 am

Posted in CDO, Teneo

Follow

Get every new post delivered to your Inbox.