You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Paulo Borges <ab...@hotmail.com> on 2013/08/25 02:09:48 UTC

Federation of multiple same databases and dynamic schema

We have a virtual federation of multiple same databases running in multiple sites. The databases and tables are identical to the letter. However; in our federated database, the tables of each site haveĀ  "site" name as their schema. Say for siteA, siteB, siteC and table1, we have the following in our federated DB

siteA.table1
siteB.table1
siteC.table1

as far as the EJB and persistence Unit is concerned we are going one [virtual] database, is there a way to set the schema of the entity for table1 dynamically at runtime based on the site information before JPQL execution.