Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] EclipseLink in OSGi environment

The best place to get started is the Gemini project. It includes the reference implementation for a number of Java EE technologies in OSGi.

http://www.eclipse.org/gemini/

The base of the JPA part of the project is here:

http://www.eclipse.org/gemini/jpa/

Documentation is on the wiki:

http://wiki.eclipse.org/Gemini/JPA/Documentation

-Tom


On 24/11/2011 12:20 PM, Eugen Reiswich wrote:
Hi folks,

I googled now for two days to find an appropriate OSGi + EclipseLink example,
but only found very basic ones.

I've got an OSGi application with the following architecture:

*Bundles:*
*.ui.customer
*.ui.account

*.domain.customer // business objects like Customer.java, Address.java etc.
*.domain.account // business objects like Account.java

*.service.customer // customer logic
*.service.account

*.service.customer.dao // persistence logic
*.service.account.dao

Using this architecture I would like to:
- use ORM.XML files in my *.dao-bundles rather that annotations in my business
objects. This should keep my business objects and domain bundles free of any
technology.
- I would like to provide one DB-Connection credentials. I understand that a
persistence.xml contains both: the persistence unit and DB-connection
information. In my example I would need two persistence.xml files for customer
and account bundles providing DB-connection information twice. Right?

*My questions are:*
1. assuming the above requirements/architecture what's the best way to make this
work with EclipseLink + JPA 2.0?
2. where do I have to put the persistence.xml file(s)?
3. How can I tell EclipseLink that my DAO-bundles provide ORM mapping files?

Regards,
Eugen


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


Back to the top