wood burning stoves 2.0*
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
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
 
 
subject: Injecting EntityManager in a servlet