My example uses the aries jpa support to connect to the provider: http://aries.apache.org/modules/jpaproject.html This implements the OSGI JPA Service spec (see the OSGi compendium spec document).
>From your bundle you use the Manifest entry Meta-Persistence to tell aries that it needs a jpa provider. The jpa provider itself has to register itself in osgi as a service with a special property javax.persistence.provider. This way aries jpa finds available providers. So basically you simply install the persistence provider you want and if the provider follows the OSGI jpa service spec then it will automatically be found by aries jpa. As far as I know openjpa and eclipse link currenty work with this. My example shows how to use openjpa. On the aries mailing list it was reported that eclipse link also should work now but I do not know how to install it. Christian On 06.02.2013 23:03, objectorange wrote: > Christian, where are you setting your JPA Provider? > > > > -- > View this message in context: > http://servicemix.396122.n5.nabble.com/OSGi-JPA-tp5715741p5715772.html > Sent from the ServiceMix - User mailing list archive at Nabble.com. -- Christian Schneider http://www.liquid-reality.de Open Source Architect http://www.talend.com