Skip to main content

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

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

Back to the top