JBoss Community

Re: JBoss : persistence and EntityManager injection

created by Wolf-Dieter Fink in Beginner's Corner - View the full discussion

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

Start a new discussion in Beginner's Corner at Community