Running EclipseLink on Karaf with JPA and JTA managed by the container

Solution Verified - Updated -

Environment

  • JBoss Fuse 6.0

Issue

I would like to run EclipseLink on Karaf. I also would like to have JPA [1] and JTA [2] managed by the container.

[1] http://aries.apache.org/modules/jpaproject.html
[2] http://aries.apache.org/modules/transactionsproject.html

Resolution

First of all - keep in mind that EclipseLink is not officially supported by the JBoss Fuse team. Consider using Apache OpenJPA [1] or Hibernate [2] as a JPA provider instead, as they are shipped with and fully supported by the Fuse.

If you still would like to use EclipseLink with Karaf, use the Maven project attached to the article as a reference example. It contains Pax Exam [3] based test running against the in-memory database, so you can safely use it as a base for your further development.

[1] http://openjpa.apache.org
[2] http://hibernate.org
[3] https://access.redhat.com/site/documentation/en-US/JBoss_Fuse/6.0/html/Deploying_into_the_Container/files/PaxExam.html

Attachments

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.