I tried to connect to multiple databases by making appropriate entries in the xml files that would finally enable me to do something of the sort ...
Code: Select all
protected EntityManager em;
protected EntityManager em2;
where blPU2 has been defined exactly in the same way as blPU in all the configuration files except that it points to a different database than that pointed to by blPU.
We are using Mysql and both blPU and blPU2 have the same schema.
However, save using em2 does not work - any pointers to how I should go about debugging and making multiple databases working, would be greatly appreciated.