karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Schmidt (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-4133) Run EclipseLink and Hibernate together within Karaf
Date Fri, 04 Dec 2015 08:47:11 GMT

    [ https://issues.apache.org/jira/browse/KARAF-4133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15041295#comment-15041295

Andy Schmidt commented on KARAF-4133:

The main topic of this issue is not to deploy different applications into the Karaf. We can
do this by using the subsystem specification or Karaf Archives/Features. What I want is to
run Hibernate and EclipseLink together within the Karaf and the JPA frameworks should work
with the Karaf JPA and JTA features to use container managed entity manager and transactions.
In my article, I added to this issue, I describe why this is not possible. The main problem
is that the Karaf JPA, JTA and Hibernate feature definition uses the artifact 'hibernate-jpa-2.1-api'.
EclipseLink can only be working with the JPA API artifact 'org.eclipse.persistence/javax.persistence'
which is provided by Eclipse. The two JPA API artifacts cannot be used at the same time, because
many ClassCastExceptions occur. But Hibernate can work with the artifact from Eclipse 'org.eclipse.persistence/javax.persistence'.
This artifact is the offical JPA API artifact, I described it in my artical. So I recommend
to change the enterprise feature definitions JPA, JTA and Hibernate to use the JPA API from
Eclipse. I tested it and it works pretty good.

> Run EclipseLink and Hibernate together within Karaf
> ---------------------------------------------------
>                 Key: KARAF-4133
>                 URL: https://issues.apache.org/jira/browse/KARAF-4133
>             Project: Karaf
>          Issue Type: Improvement
>          Components: karaf-feature
>    Affects Versions: 3.0.5
>            Reporter: Andy Schmidt
>             Fix For: 3.0.6, 4.0.4
>         Attachments: EclipseLink_Hibernate_with_Karaf.pdf
> In my company we are using Karaf 3.0.5 as application container to different applications.
We have the situation to run Hibernate and EclipseLink as JPA implementation together within
a single Karaf, because different applications use different JPA implementations. Which kind
of implementation is used is defined by the persistence unit of each application.
> I wrote an article which describes how to get the most important Java Persistence API
(JPA) implementations, EclipseLink and Hibernate, running together within a single Apache
Karaf. The article describes why this is not possible with the current Karaf enterprise feature
definitions and what has to be done to make it work. I will add the article to this issue
description. Please read my article and I hope you can change the enterprise feature definition
descripte in the article to get this possible.

This message was sent by Atlassian JIRA

View raw message