aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Injecting EntityManager in a servlet" Watch "Injecting EntityManager in a servlet" New topic

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.
I agree. Here's the link:
subject: Injecting EntityManager in a servlet
Similar Threads
JPA with JSF and Concurrency
EntityManager managed by application
Appropiate place for creating and closing EntityManagerFactory in Application Managed EntityManager
How to write a bootstrap code
spring wont inject the entitymanager