Dec 9th, 2012, 04:52 AM
JPA: spring appl calls other spring appl, the both appl have an EntityManager - issue
We have spring applications (client spring app) calling other spring app (target spring app). Each appl has its entityManagerFactory (with OpenJPA impl) defined.
We got this issue:
Caused by: org.springframework.beans.factory.NoSuchBeanDefini tionException: No unique bean of type [javax.persistence.EntityManagerFactory] is defined: expected single bean but found 2
constraints : the client & target appl are 2 different projects and we cannot merge the 2 appl !
currently the client appl imports the target appl importing the spring resource file of the target app.
1) Is it the best approach ?
2) how can we manage different emf in a complex appl solution ?
please help us !!!!
Tags for this Thread