-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: OSGi and managed jpa
PostPosted: Sat Jan 04, 2014 3:48 pm 
Newbie

Joined: Fri Jan 03, 2014 3:32 am
Posts: 3
Hi

I have been trying to get hibernate-osgi to work using container managed jpa in virgo (which IIRC is equinox based). However, I was not really successful in doing so.

First I tried combining hibernate-osgi with aries-jpa (the jpa21 branch https://github.com/brmeyer/aries/tree/jpa21, BTW its a major pain in the backside that this code does not compile on a mac with jdk7). While this should work I had problems where either hibernate-osgi or aries-jpa were hanging in starting state forever (without any meaningful error messages being printed out).
The next approach was to try and run hibernate-osgi together with gemini jpa, however, it seems that gemini-jpa only works with eclipse link (at least I did not figure out how to use it with hibernate-osgi).

So my questions are:
1. is there some recommended setup which is supposed to work (ideally a ready made example that I can deploy to a recent equinox)
2. is the jpa21 branch of aries-jpa really the only viable option for the aries route? This seems a quite laborious route in order to get this to work. It certainly does not have the "tutorial character" that most people are looking for.
3. are there other enterprise jpa containers that are supposed to work?

I read the thread https://forum.hibernate.org/viewtopic.php?f=1&t=1029974 where the original poster got hibernate working without using a container but building the EMF himself out of the PersistenceProvider. This would probably be an option but (AFAIK) requires some buddy class loading gymnastics etc which the managed jpa solution (IMHO) should avoid.

Any suggestions?

thanks


Top
 Profile  
 
 Post subject: Re: OSGi and managed jpa
PostPosted: Wed Jan 08, 2014 4:28 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 18, 2012 5:03 am
Posts: 36
Location: Fort Wayne, Indiana, USA
Integrating and testing with Equinox/Gemini, and providing a quickstart, is towards the top of my list. But, unfortunately, we've been swamped. We've fully tested with a Karaf/Felix & Aries JPA setup. And yes, it's definitely a pain to use that separate Aries branch, but the team will hopefully be pulling in the JPA 2.1 work in a soonish release.

You mention that my Aries fork doesn't compile -- what exactly are you seeing?


Top
 Profile  
 
 Post subject: Re: OSGi and managed jpa
PostPosted: Wed Jan 08, 2014 4:34 pm 
Newbie

Joined: Fri Jan 03, 2014 3:32 am
Posts: 3
If you compile with JDK7 then the compilation will not work (some deprecated classes were removed). I had to switch to jdk6 to be able to compile it. Note that the java JVM version needs to be java6, not the maven compiler settings.


Top
 Profile  
 
 Post subject: Re: OSGi and managed jpa
PostPosted: Wed Jan 08, 2014 4:35 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 18, 2012 5:03 am
Posts: 36
Location: Fort Wayne, Indiana, USA
Sorry, forgot -- Apache Aries still requires JDK 6. Not idea about their plans to support 7.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.