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