| jpa entities in different bundles under virgo [message #676867] |
Mon, 06 June 2011 15:25  |
attila Missing name Messages: 45 Registered: April 2010 |
Member |
|
|
Hi,
Did anybody try under Virgo to split a jpa entities bundle in more bundles ?
For example there are 2 bundles jpa-bundle1 with Entity1 and jpa-bundle2 with Entity2
Entity2 has a reference field to Entity1. Both entities should be part of the same persistence unit.
Now i'd like to create an EntityManager in bundle-3 and pass it to other bundles (bundle 4,5 .. ) without explicitly import the jpa bundles in bundle-3
Any comments ?
Thank you
|
|
|
|
| Re: jpa entities in different bundles under virgo [message #685495 is a reply to message #683347] |
Fri, 17 June 2011 12:20  |
attila Missing name Messages: 45 Registered: April 2010 |
Member |
|
|
Thank you Dmitry,
the goal of this approach is something like this:
provider 1 creates base application with jpa-bundle 1
provider 2 creates extension for application with jpa-bundle 2
and the final user/customer presumably without much technical skills should be able to activate or not the extension.
Of course if there is an extension at model level is very likely to be also at the other layers (service, user-interface , etc) and then it can publish its own service/entityManager and notify the base application's extension points in a way or other. This works fine, i was just interested about other options.
The first idea i thought of was something similar to your event listener proposal and somehow i didn't feel very comfortable even to try it .
I don't see however what you mean with the second one , could you please give me a hint/link ?
Thank you
[Updated on: Fri, 17 June 2011 12:36] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.01604 seconds