multiple xml-mappings from fragments? [message #385496] |
Mon, 23 February 2009 09:11  |
Eclipse User |
|
|
|
Hello experts,
I'm new in using eclipselink and would like to run it in a Spring DM
environment.
I would like to have a modular application structure, which could be
extended by just adding additional bundles. So I tried to use fragments,
which are providing additional xml-mappings to enable additional entities.
My project bundles structure looks lite this:
* core.domain
- bundle exporting some abstract and tooling classes
* core.persistence
- bundle wich uses spring dm to instantiate the
EclipseLinkJpaVendorAdapter and LocalContainerEntityManagerFactoryBean
to create a EntityManagerFactory for all components
* component_a.domain
- bundle exporting domain-classes of component_a
* component_a.persistence
- fragment with eclipselink-orm.xml for defining entities of
component_a - depends on component_a.domain
- host is core.persistence
- depends on component_a.domain
* component_b.domain
- similar to component_a.domain
* component_b.persistence
- similar to component_a.persistence
Can I define in the persistence.xml (placed in core.persistence) that
every eclipselink-orm.xml from the multiple fragments have to be loaded?
Using only component_a with eclipselink-orm.xml and persistence.xml in
it, this is working.
Using component_a and component_b together the mapping of component_a is
not loaded.
regards,
Lars
|
|
|
|
|
|
|
Re: multiple xml-mappings from fragments? [message #387089 is a reply to message #385501] |
Tue, 14 April 2009 15:17  |
Eclipse User |
|
|
|
>> I would assume that you have to explicitly list each orm.xml in the
>> persistence.xml.
>
> hmm, thats what I suspected. But this does not look like a good solution
> to me. If I decide to deploy a new component as fragment, then I won't
> edit the host-bundle. For this I can have one non expandable persistence
> bundle which always has to be updated.
>
> There is no such thing like the rcp-extensionpoints for eclipselink?
Have you found a solution to your problem? I just ran into a similar
problem, when a spread my entities over several model-bundles.
regards,
Christian
|
|
|
Powered by
FUDForum. Page generated in 0.04072 seconds