I am trying to figure out an example of JPA
(containing an example of Student Entity, with name and class) using Eclipselink & Derby
. I am able to do it in Java EE but I can't figure out a way to do it simply in OSGi
using Declarative Services
.
Can anyone share some info on any such examples which uses JPA with OSGi DS
?
Some of the examples I have gone through are here, but these examples use getReference
or getTracker
however I don't want to use them.
Thank you.
You can take a look at the OSGi enRoute project's tutorial. This is still work in progress but in phase 10 it actually uses JPA, transactions, etc.
https://github.com/osgi/osgi.enroute.blog
In the master branch there is a PDF that describes the tutorial in detail, step by step. Each step is a branch so you can look at the 10-jpa branch. It uses bndtools.
This is work in progress but it should give you a good idea.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With