You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Harald Wellmann <Ha...@multi-m.de> on 2010/09/17 20:50:09 UTC

OSGi-ready Distribution

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.

Re: OSGi-ready Distribution

Posted by Donald Woods <dw...@apache.org>.
The openjpa artifact uses as many up-leveled dependencies that have
bundle metadata as are available in the public maven repos.  Using
private maven repos for build dependencies is frowned upon and will
eventually be blocked by the Apache Nexus repo, so I don't want to go
down that path.

The openjpa-all artifact is not created as a bundle.  It is only meant
to help expedite the creation of Java SE apps....

As far as Aries, this is a chicken and egg problem.  Aries depends on
OpenJPA as the provider and OpenJPA requires on Aries for OSGi
enablement.  You can 't have circular dependencies in Maven builds, so
the best place to create an Aries + OpenJPA assembly would be in the
Aries project.

Can you describe what scenario you are trying to solve?  Are you looking
for someone to provide a prebuilt Aries+OpenJPA assembly for Java SE or
something more like Java EE and Apache Geronimo 3.0?


-Donald


On 9/17/10 2:50 PM, Harald Wellmann wrote:
> 
> 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
> 

Re: OSGi-ready Distribution

Posted by Donald Woods <dw...@apache.org>.
Also, I'd suggest using the Apache ServiceMix released bundles (used in
Apache Geronimo 3.0), which are mirrored on all Maven repos.

http://repo2.maven.org/maven2/org/apache/servicemix/bundles/


-Donald


On 9/17/10 2:50 PM, Harald Wellmann wrote:
> 
> 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
>