users@glassfish.java.net

Re: Using multiple databases with JPA

From: <glassfish_at_javadesktop.org>
Date: Tue, 31 Jul 2007 14:25:39 PDT

Hi Rodrigo,

Unless you can make one database hide the other (e.g. via views), each PU can refer to only a single database, and the scope of a JPQL query is limitted to a single PU. Your best options to have 2 PUs with each EMs from 2 EMFs managing objects from 2 different databases.

You can use more than 1 PU in a single application.

Regards,
-marina
[Message sent by forum member 'mvatkina' (mvatkina)]

http://forums.java.net/jive/thread.jspa?messageID=228947