You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by James Talbut <jt...@tardis.spudsoft> on 2012/02/28 09:49:30 UTC

OpenJPA and OSGi - splitting the persistence context

Hi,

I'm working on a system that is due to be hosted in Apache Felix.
There will be one central library that provides (amongst other things) a bunch of common JPA classes.
Then there will be a continually increasing number of additional bundles providing web services that use those JPA and, crucially, add to them.
Each of the web service classes will need at least one JPA class that derives from a class in the shared library.
I don't need the library to share any state between the web services, it's just a bunch of common code.

Is it possible for a jar to extend the persistence.xml defined in another jar?

If not, do I need to have a separate persistence context for the library and the web service jars?

Can OpenJPA work as nothing more than a bunch of classes exposed from a bundle?

Thanks

Jim