Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Defining persistence.xml programmatically?

dhermanns wrote:
Is there anything new regarding Equinox support? It seems to us that auto
discovering ist still not working with equinox - or am i missing something?
Auto discovery has not been implemented in EclipseLink OSGi.  Auto discovery is supported in Java EE and can be enabled in Java SE but it may be expensive because of the size of a given application's classpath.  My assumption is that auto discovery in OSGi will be challenging given its classloader architecture and the lack of an "application" concept.  In Java EE, the persistence unit scope is limited to the EAR or WAR.  In OSGi there is currently no mechanism to identify a set of bundles as comprising an application and therefore a scope for auto discovery.
Further more, i would like to have Entities distributed over multiple osgi
bundles, but they should be in the same persistence unit (so that e.g.
transactions are working). We are using the different bundles to modularize
our application. 
This is supported.
I was searching a lot about this topic but can't find something about it.
Can anyone help about my 2 questions?
In a recent thread [1] on the forum there was a discussion of byte code weaving in Equinox that you may find interesting.  Due to the way annotations are processed in EclipseLink 2.0, byte code weaving of entities in multiple bundles is possible.


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