users@glassfish.java.net

Re: multiple datasources

From: <glassfish_at_javadesktop.org>
Date: Fri, 21 Sep 2007 13:23:46 PDT

It is not possible with TopLink Essentials (default in GlassFish) to dynamically change the datasource for the same PU name. But if you have only 3 predefined datasources, define 3 PUs in the same persistence.xml, and inject 3 different entity managers. Then choose which one to use depending on the incoming information.

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

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