[jboss-as7-dev] How to test this OSGi Enterprise R5 JPA stuff... was: [Re: OSGi version of javax.persistence spec]

Thomas Diesler thomas.diesler at jboss.com
Mon Sep 3 05:13:54 EDT 2012


Scott,

The Enterprise OSGi spec defines the roles of

  * JPA Provider - An implementation of JPA, providing the Persistence
    Provider and JPA Services
  * Persistence Bundle - A bundle that includes, a Meta-Persistence
    header, one or more Persistence Descriptor resources, and the entity
    classes specified by the Persistence Units in those resources.
  * Client Bundle - The bundle that uses the Persistence Bundle to
    retrieve and store objects.

in the context of a pure OSGi Runtime (i.e. Felix, Equinox). What we 
need to do in the context of AS7 is to make sure that client bundles 
developed against the this spec run on AS7. We are not trying to build 
an OSGi JPA Provider that runs on a pure OSGi Runtime - so integration 
rather than implementation.

This essentially means that the JPA subsubsystem and its associated OSGi 
extension can handle OSGi JPA deployments and make the 
EntityManagerFactory/EntityManagerFactoryBuilder services available.

I took a first hit on this task and filed #2992 
<https://github.com/jbossas/jboss-as/pull/2992> which would resolve 
[AS7-5405] Initial Enterprise OSGi JPA implementation 
<https://issues.jboss.org/browse/AS7-5405>. As the name suggests this is 
an initial implementation which supports the deployment of an 
persistence/client bundle, registers EntityManagerFactory and exercises 
entity persistence on the default provider.

Additionally, I filed [AS7-5476] Complete support for OSGi JPA 
<https://issues.jboss.org/browse/AS7-5476> which outlines missing 
functionality that I'm aware of.

The HHH-7527 effort can be done in parallel, but is not a prerequisite 
for Enterprise OSGi JPA in AS7.

cheers
--thomas


On 08/31/2012 03:42 PM, Scott Marlow wrote:
> Thomas,
>
> I see that AS7-5465 is targeted for AS 7.2 but 7.2 doesn't package a 
> OSGI enabled persistence provider.  That will change when we add OSGI 
> support to Hibernate (via HHH-7527 & anything else that is needed).  
> Its not yet clear which version of AS, will be aligned with the 
> Hibernate version that includes the OSGi support.
>
> I believe that the EclipseLink persistence provider has OSGi support. 
> Not sure yet about the others.  We will soon have the ability to 
> (globally) configure the default persistence provider (module name). 
> So, it should be less pain to choose an OSGi enabled provider of the 
> users choice.
>
> So, until we have a OSGi enabled version of Hibernate in AS, how can 
> we test with another OSGi enabled persistence provider?  I heard that 
> we have some unit tests that download Maven artifacts via the 
> ShrinkWrap Maven resolver but I have yet to see that in action in the 
> AS7 tests that I have looked at.
>
> What do you suggest for testing this OSGi Enterprise JPA stuff...
>
> Scott
>
> On 08/31/2012 07:16 AM, Thomas Diesler wrote:
>> Hi Paul,
>>
>> could you possibly provide a javax.persistence API bundle?
>>
>> https://issues.jboss.org/browse/AS7-5465
>>
>> cheers
>> --thomas
>>
>

-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thomas Diesler
JBoss OSGi Lead
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-as7-dev/attachments/20120903/c6ab68ac/attachment.html 


More information about the jboss-as7-dev mailing list