If you use the @javax.persistence.Table annotation, you can use the catalog parameter to discriminate between databases.
EDIT: Try defining separate hibernate-cfg.xml files (call them db1-hibernate-cfg.xml and db2-hibernate-cfg.xml) and in the xml element use the element to list out the entites that correspond to that factory. You may also define these in the orm.xml that corresponds to JPA.
Then in your spring configuration explicitly define which hibernate-cfg (or orm.xml) maps to which EntityManager:
Example using Spring's LocalContainerEntityManagerFactoryBean:
<bean id="emf" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="persistenceUnitManager" ref="pum" />
<property name="persistenceUnitName" value="my-pu" />
<property name="jpaProperties">
<props>
<prop key="hibernate.ejb.cfgfile">my-hibernate.cfg.xml</prop>
... other configurations
</props>
</bean>
If you go the route of defining separate orm.xml files then in your persistence-unit-manager, define a separate persistence.xml file for each entity manager factory (say db1-persistence.xml and db2 ..). In the persistence.xml file use the element to define the corresponding orm.xml file.
The default location of these files is classpath-relative.