Does anyony have an example how to use JPA (Hibernate) with iPOJO?
What is the usual way how OSGi bundles (using iPOJO) interact with databases. For example, is the EntityManagerFactory provided as a service? Or is there a single service that is responsible for working with the database (and this service create an EntityManager using the factory)?
It's not related to iPOJO, it's more about how to use JPA in OSGi. Apache Aries has done a nice set of bundles to support JPA (http://aries.apache.org/modules/jpaproject.html). Wisdom Framework (http://wisdom-framework.org) also supports JPA (OpenJPA) (https://github.com/wisdom-framework/wisdom-jdbc/tree/master/openjpa-sample)