[jboss-user] [Beginner's Corner] - Re: JBoss : persistence and EntityManager injection
Wolf-Dieter Fink
do-not-reply at jboss.com
Thu Oct 14 06:48:50 EDT 2010
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&containerType=14&container=2075]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20101014/643a7814/attachment.html
More information about the jboss-user
mailing list