I\'m trying to configure Spring+Hibernate+JPA for work with two databases (MySQL and MSSQL).
My datasource-context.xml:
Justin, number 3 can be done in a more standard way like this:
In your Spring context:
In your Spring-managed DAOs (note the unitName property):
@PersistenceContext(unitName = "pu1"`) protected EntityManager entityManager;
This way a properly intantiated EntityManager corresponding to the persistence unit named "pu1" would be injected in the corresponding DAOs.