Announcement Announcement Module
Collapse
No announcement yet.
JPA: spring appl calls other spring appl, the both appl have an EntityManager - issue Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JPA: spring appl calls other spring appl, the both appl have an EntityManager - issue

    Hi,

    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 !!!!
Working...
X