initial multiple database connection not working
Posted: Mon Jan 27, 2014 1:15 pm
Hi,
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 ...
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.
thanks
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
@PersistenceContext(unitName="blPU")
protected EntityManager em;
@PersistenceContext(unitName="blPU2")
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.
thanks