karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ward <tim.w...@paremus.com>
Subject Re: JPA (Hibernate) with Apache Karaf 4.2
Date Wed, 30 May 2018 09:09:01 GMT
Have you all considered looking at the JPA example/tutorial in OSGi enRoute? This demonstrates
how to use Aries JPA 2.7 (the reference implementation of the OSGi JPA Service 1.1) with Hibernate
and Aries Transaction Control (the reference implementation of the OSGi Transaction Control
Service) to create a transactional data access service using JPA.

https://enroute.osgi.org/tutorial/032-tutorial_microservice-jpa.html <https://enroute.osgi.org/tutorial/032-tutorial_microservice-jpa.html>

Note that this guide includes descriptions of the various hibernate bugs that you have to
work around.

I hope this helps,

Tim

> On 29 May 2018, at 20:20, Kerry <karaf-user@avionicengineers.com> wrote:
> 
> Hi Alex,
> 
> I've created a simple project that shows how to use JPA in Karaf although it uses OpenJPA
as the JPA provider:
> 
> https://github.com/jtkb/jpatest
> 
> Hopefully it will be straight forward enough for you to get to grips with JPA in an OSGi
environment.
> 
> Kerry
> 
> 
> On 29/05/18 19:54, alex09 wrote:
>> Hi there,
>> 
>> being new to OSGi, I have difficulties getting demos/examples/tutorials to
>> run (esp. with JPA) with Apache Karaf 4.2.
>> 
>> I tried all these resources:
>> * Apache Aries 2.7 JPA examples:
>> https://github.com/apache/aries-jpa/tree/master/examples (also user
>> documentation is not accurate for the current Karaf versions)
>> * Tutorials at http://karaf.apache.org/documentation.html#tutorials, which
>> don't work as liquid-reality.de has not been available for weeks now (I
>> found some of them here, but still they don't work:
>> https://github.com/cschneider/Karaf-Tutorial)
>> * Apache Aries 2.7: The Blog Example:
>> http://aries.apache.org/modules/samples/blog-sample.html
>> * Hibernate Demos:
>> https://github.com/hibernate/hibernate-demos/tree/master/hibernate-orm/osgi
>> (also reflecting the outdated user documentation)
>> * also the Entwicklerpress 143 book "OSGi Entwicklung" and Enterprise OSGi
>> in Action
>> 
>> All without success, the sample are really dated and there is a lot more to
>> do than just simple changes - this is difficult for someone coming new to
>> this topic.
>> I'd certainly volunteer for helping with this, but as there is no starting
>> point currently, this is complicated.
>> 
>> So my question is: are there any plans to create a new, sound
>> description/documentation/tutorial/example for JPA/Hibernate on Apache Karaf
>> 4.x? Or isn't this supposed to work anymore as there are better practices
>> for persistence in OSGi?
>> 
>> Thanks & Best
>> 
>> Alex
>> 
>> 
>> 
>> --
>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>> 
> 


Mime
View raw message