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:
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.
<tx:annotation-driven transaction-manager="transactionManager" /> .... <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>