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.