Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Entities in separated OSGi bundle & EclipseLink

Hi Cyril,

   You can currently put entities in separate bundles with EclipseLink.  You just have to make sure that all entities are in bundles that are visible to the bundle with the persistence.xml that references them; see example below.

    However, the new OSGi JPA specification requires all entities to be packaged in the same bundle as the persistence.xml.  The Eclipse Gemini project is providing the reference implementation of the OSGi JPA spec based on EclipseLink.  It's not known yet whether it will be possible to continue supporting entities in multiple bundles in the short term.

    Shaun

BundleA:

    a.model.EntityA

BundleB

    b.model.EntityB

BundleC
    manifest.mf
        import-package: a.model, b.model
    persistence.xml
        <class>a.model.EntityA</class>
        <class>b.model.EntityB</class>





On 25/2/2010 4:27 PM, Giraudon Cyril wrote:
Hello,

Reading some posts, it seems that it is now possible to have JPA
entities in separated bundles.
However I don't see how to do this.

Is there any simple example which shows this capability ?

Thanks a lot,

Cyril.

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
  

--
Oracle
Shaun Smith | Principal Product Manager
Phone: +19055023094
Oracle Server Technologies, Oracle TopLink
ORACLE Canada | 110 Matheson Boulevard West, Suite 100, Mississauga, Ontario | L5R 3P4

Green Oracle Oracle is committed to developing practices and products that help protect the environment

Back to the top