When you download the OpenJPA binary distribution, you get the main OpenJPA JAR as an OSGi bundle, but most of the dependencies are plain old JARs, so you have to go shopping for osgified versions. I got mine from the SpringSource Enterprise Bundle Repository.
The same is true when working with Maven. All the transitive dependencies of openjpa-all should be OSGi bundles. Alternatively, you could create a separate artifact openjpa-osgi with osgified dependencies. As an add-on, or maybe as an integral part of the OSGi distribution, there should be a minimum subset of Aries (or any other suitable OSGi Enterprise implementation) required to make a persistence unit bundle work with OpenJPA. I had to include the following bundles to get a simple example running: org.apache.aries.jndi.api-0.3-incubating-SNAPSHOT.jar org.apache.aries.jndi.core-0.3-incubating-SNAPSHOT.jar org.apache.aries.jndi.url-0.3-incubating-SNAPSHOT.jar org.apache.aries.jpa.api-0.3-incubating-SNAPSHOT.jar org.apache.aries.jpa.container-0.3-incubating-SNAPSHOT.jar org.apache.aries.util-0.3-incubating-SNAPSHOT.jar Best regards, Harald -- View this message in context: http://openjpa.208410.n2.nabble.com/OSGi-ready-Distribution-tp5543925p5543925.html Sent from the OpenJPA Users mailing list archive at Nabble.com.
