In this section we will see how, starting from Eclipse Juno Modeling, you can install some plugins that will allow management of the persistence to a database using the Teneo framework.
This framework implements a layer that links EMF and ORMs like Hibernate or EclipseLink, which in turn handle the persistence on relational databases.
The advantage, in using Teneo, is that you can act at EMF level and hit the database, without knowing the intermediate mechanisms.
Regarding the database choice, in this series of articles, we will work with MySQL as target database.
Go to menu Help -> Install New Software…, press button Add… , set “Teneo Dependencies” into Name field the following address into Location field:
press OK and select the following items:
- Apache Commons Logging
- Apache Log4j
- Javax Persistence
- MySQL Connector/J
then press button Next and follow the wizard until you are asked to restart Eclipse. Just answer no by pressing button “Not Now” since we need some more install to be completed.
Let’s repeat the operation ( Help -> Install New Software…), now typing “Teneo 2.0.0” into Name field and the following address into Location field:
press OK and select the category “EMF Teneo – Hibernate“
now press Next button and follow the wizard until we are asked to restart Eclipse. This time let’s accept, by clicking “Restart Now“.
You can find details about how to download, install and use Teneo on the official Wiki page: