I have one main bundle that loads the persistence.xml file and create an entityManagerFactory using LocalContainerEntityManagerFactoryBean in the context file.
I hope a class in any other bundles could have EntityManager injected when @PersistenceContext is used for the class.
(1) I do not know how to publish javax.persistence.EntityManagerFactory in the context. If I publish EntityManagerFactoryInfo as a service in the main bundle, it does not work for other bundles.
(2) Is there any built-in support for it in Virgo (by SpringFramework)?