[jboss-user] [EJB 3.0] - Re: Why is injection not working in AS 4.0 and 4.2 (servlets

sannegrinovero do-not-reply at jboss.com
Mon Apr 13 05:52:11 EDT 2009

Hi, this sticky thread got a bit messy: Seam is not relevant in the discussion.

Injecting an EntityManager in a servlet is just wrong: servlets get concurrent requests and you really don't want an instance level EntityManager; Inject the EntityManagerFactory instead and use it to create a new entitymanager in method scope.
IMHO not supporting this in JBoss4 was a good idea.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225076#4225076

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225076

More information about the jboss-user mailing list