aries-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harald Wellmann <>
Subject AW: JPA Service: EntityManagerFactoryBuilder
Date Mon, 27 Sep 2010 11:57:19 GMT
Hi Tim,

it seems I misinterpreted the EntityManagerFactoryBuilder - thanks for pointing this out.

But I still don't see how to solve the situation with one persistence unit working on multiple
databases with the same structure, neither in OSGi nor in Java EE.

In Java SE, I would simply call Persistence.createEntityManagerFactory(puName, props) multiple
times, with the same persistence unit name, but different property sets, specifying different

E.g. think of a business intelligence application doing analysis on customer databases, where
there is a separate database for each country. Each analysis request refers to given country,
and the application has to select the appropriate database at run-time. New countries may
be added at any time, so it would not work to hard-code n persistence units and/or EMFs up

Best regards,

View raw message