multiple xml-mappings from fragments? [message #385496] |
Mon, 23 February 2009 14: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 #385499 is a reply to message #385498] |
Wed, 25 February 2009 09:17   |
Eclipse User |
|
|
|
Hello James,
Am 24.02.2009 14:56, schrieb James:
> Do you list each orm.xml file explicitly in the persistence.xml, and
> give each a unique path?
This is one problem I have seen. I think I have to place the
persistence.xml in the core.persistence bundle. The additional orm.xml
files should be placed in the additional fragments.
Do I have to change the persistence.xml when adding new fragments? Or
can I specify that every xyz-orm.xml will be used?
Or can I have also additional persistence.xml-files in the fragments
containing the same persistence-unit to configure the new orm.xml?
regards,
Lars
|
|
|
|
Re: multiple xml-mappings from fragments? [message #385501 is a reply to message #385500] |
Wed, 25 February 2009 13:52   |
Eclipse User |
|
|
|
Am 25.02.2009 14:14, schrieb James:
> 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?
Thank you,
Lars
|
|
|
Re: multiple xml-mappings from fragments? [message #387089 is a reply to message #385501] |
Tue, 14 April 2009 19: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.04855 seconds