my dog learned polymorphism*
The moose likes JBoss/WildFly and the fly likes Injecting EntityManager in a servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Injecting EntityManager in a servlet" Watch "Injecting EntityManager in a servlet" New topic
Author

Injecting EntityManager in a servlet

Ganesha Kumar
Ranch Hand

Joined: May 04, 2006
Posts: 56
As the Sun's JEE tutorial, you can inject EntityManager/EntityManagerFactory in servlet or a class implementing ServletContextListener. I have a sample application that injects EntityManagerFactory in a class implementing ServletContextListener. It is working fine with the application server GlassFish. I tried to the same thing with JBoss. The EntityManager was never injected. It was always null. Can someone help me out.
Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Injecting EntityManager in a servlet
 
Similar Threads
spring wont inject the entitymanager
Appropiate place for creating and closing EntityManagerFactory in Application Managed EntityManager
JPA with JSF and Concurrency
EntityManager managed by application
How to write a bootstrap code