Two Persistence Units, Two entityManagerFactory(s), SPring, JPA, Hibernate
Posted
by sebajb
on Stack Overflow
See other posts from Stack Overflow
or by sebajb
Published on 2010-06-08T12:41:57Z
Indexed on
2010/06/08
12:42 UTC
Read the original article
Hit count: 212
I am using Two entityManagerFactory{1,2} based on two persistence units, autowired through spring, hibernate, with resource local. My DaoImpls are configured with the PersistenceUnit(unitName='...') according to the unit needed. I was under the impression that using them with the unitName specified would allow me to use x number of PUs without problem but I still get: expected single matching bean but found two: [emf1, emf2]. Am I missing some other configuration?
© Stack Overflow or respective owner