HomeEMF HibernateEMF JDO/JPOXWeb App GenerationServices
 

Download and Install

The installation consists of the steps listed below.

EMF Installation

EMF can be installed in Eclipse using the Eclipse update manager. See here for more information. It is best to install the EMF SDK 2.3.* which contains the complete bundle with emf, xsd and sdo.

EMF - hibernate Persistency Plugin Installation

The EMF Persistency plugin can be downloaded from the eclipse.org/emf update site. To configure this update site in Eclipse go to: Help > Software Updates > Find and Install. Select 'Search for new features to install' and click next.

At this window create a new update site by clicking on 'New Remote Site'. Enter any name you want, as a url enter: http://download.eclipse.org/modeling/emf/updates/interim/, and press ok.

Select the newly created update site and press finish. When the update site contents are shown, select the Teneo EMF Persistency (possibly followed by version information) Feature.

The feature consists of a number of plugins: org.eclipse.emf.teneo.hibernate.eclipse and org.eclipse.emf.teneo.hibernate. The first plugin contains the OR Mapper which generates jdo descriptor files. The second plugin contains the jar files for the EMF persistency runtime.

After you have installed the plugin and restarted eclipse you will see a new menu entry called Teneo when you right click on an ecore file.

Note, if you have a earlier version of the EMF persistency plugin installed then it is possible that you need to manually disable the previous version of the EMF - hibernate feature, see here.

Hibernate Libraries

The EMF persistency feature does not contain the Hibernate libraries (and its dependencies). Please download the Hibernate libraries separately from: the hibernate website.

A common approach is to place the Hibernate libraries in a separate plugin on which your model plugin will depend. If you do this then you should also set the BuddyPolicy in the plugin containing the Hibernate jars (in the Manifest.MF), for example: Eclipse-BuddyPolicy: dependent.

Install the EMF - Hibernate Runtime plugin

The installed runtime plugin (org.eclipse.emf.teneo.hibernate) can be used in two ways: 1) in an EMF model plugin, 2) in a non-plugin project.

Using the runtime plugin in an EMF model plugin

To install the runtime plugin in an EMF model plugin go through the following steps (in this order):

  1. In the plugin.xml, dependency tab, of the EMF model plugin project add a dependency to the org.eclipse.emf.teneo.hibernate plugin. Enable this plugin for export (reexport dependency).
  2. Add a JDBC driver to the EMF editor (or the model) plugin project. If only added to the EMF model project ensure that the EMF editor project has access to the jdbc driver.

From here please follow either the Quick Start or the Library Tutorial.

Installing the runtime layer in a non-plugin EMF project

In case of a non-plugin project all the jar-files present in the following plugins should be in the classpath:

  • org.eclipse.emf.teneo
  • org.eclipse.emf.teneo.annotations
  • org.eclipse.emf.teneo.hibernate
  • org.eclipse.emf.teneo.hibernate.mapper

In addition the hibernate libraries and a jdbc driver should be added to the classpath.