Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » How to inject EntityManager in each bundle?
How to inject EntityManager in each bundle? [message #633047] Fri, 15 October 2010 04:16 Go to previous message
guofeng zhang is currently offline guofeng zhang
Messages: 49
Registered: July 2009
Member
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)?

Thanks

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:dm Server Tools manifest problem
Next Topic:AnnotationFormatError: what does it means and how to solve it?
Goto Forum:
  


Current Time: Wed May 22 21:50:15 EDT 2013

Powered by FUDForum. Page generated in 0.06267 seconds