Search code examples
jpaosgieclipselinkapache-felixosgi-bundle

Using Jpa inside apache felix framework implementation


I was trying to implement an OSGi application , application has servlet(implemented using jetty), jaxb(using eclipselink moxy), and Jpa part(the problem part). I was trying to use eclipselink inside apache felix container for jpa functionality, I tried various approach but couldn't implement it. I just need some working example or tutorial link.


Solution

  • The easiest way to use jpa in felix is to use Apache Karaf as it has pre packaged features for eclipselink as well as Aries JPA which makes it easier to use any jpa provider in OSGi.

    See example with declarative services, or with blueprint.

    For plain felix I recommend to use bndtools to get the list of bundles and also to be able to directly run felix.

    I started a tutorial to package and run the tasklist-ds example using bndtools