Announcement Announcement Module
Collapse
No announcement yet.
Using Multiple JPA Persistence Units Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using Multiple JPA Persistence Units

    I have a question regarding multiple persistence contexts in a spring JPA application. I have a fairly large application with several different jpa components that each have a different databases/contexts. I am attempting to load all these configurations into one spring context for the application. I am using annotation driven transaction management and also annotation driven EntityManager injection:
    Code:
     <tx:annotation-driven transaction-manager="transactionManager" />
    ....
      <bean  class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
    Is there a way to scope the beans that an annotation-driven transaction manager is applied to? I don't want the beans from one package to pick up the transaction manager from another.
Working...
X