Hi,

My application is working with different entities from 2 different DB's (for example, the users are in one DB, the invoices are in another DB).
I have 2 entity managers in my applicationConfig.xml, defined like this:

Code:
<bean id="emf1" class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
	<property name="persistenceUnitName" value="persistenceUnit1"/>
</bean>

<bean id="emf2" class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
	<property name="persistenceUnitName" value="persistenceUnit2"/>
</bean>
(the persistence units are defined in persistence.xml).

I will have a bunch of DAO's that will use Spring-Data, each Dao connecting to only one of the 2 databases.
How can I configure the DAO's so Spring Data knows which entity manager to use when creating the implementation of the DAO ?

Thanks.