Hi all,
I have some questions about Eclipselink JPA in OSGi:
The first one is about the architecture of JPA OSGi, which bundle from JPA
read the persistence.xml? And which bundle reads the persistence Unit
declared in the manifest? how the persistence Unit is handled by JPA? What
happens if I have several bundles publishing the same persistence Unit or
what happen if I have several bundles using the same data base with
different persistence units? A big picture would be ok to understand how
Eclipselink JPA works with OSGi. Does anybody knows where could I find
this information or someone knows how it works?
Hi Omar,
,
> I have some questions about Eclipselink JPA in OSGi:
> The first one is about the architecture of JPA OSGi, which bundle from JPA
> read the persistence.xml?
org.eclipse.persistence.jpa contains the EclipseLink JPA implementation
and the persistence.xml is read by code in this bundle.
> And which bundle reads the persistence Unit
> declared in the manifest?
Same bundle.
> how the persistence Unit is handled by JPA? What
> happens if I have several bundles publishing the same persistence Unit or
> what happen if I have several bundles using the same data base with
> different persistence units?
As of the 1.1.2 release you can't have two persistence units with the same
name. This will be addressed in a future release. The same database issue
is no different in OSGi than outside.
>A big picture would be ok to understand how
> Eclipselink JPA works with OSGi. Does anybody knows where could I find
> this information or someone knows how it works?
I gave a presentation on this at OSGi DevCon last month. I don't go into
great detail as most people want to know how to use it rather than how it
works, but I do point out some of the implementation challenges and
solutions. You can find the slides on my blog: http://onpersistence.blogspot.com/2009/06/osgi-persistence-s lides-from-osgi.html