Wolf-Dieter Fink [
http://community.jboss.org/people/wdfink] created the discussion
"Re: JBoss : persistence and EntityManager injection"
To view the discussion, visit:
http://community.jboss.org/message/566444#566444
--------------------------------------------------------------
As I said before, "nothing magic, the container do the work".
This mean, if you are inside your servlet, the container analyse your servlet, inject the
annotated fields and invoke the servlet method.
If you instanciate a class by yourself, the container is not within the chain.
With the next generation of JEE the scope of injection will be extended, but im not sure
that code like your example will work.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/566444#566444]
Start a new discussion in Beginner's Corner at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]