[jboss-user] [JBoss Microcontainer Users] - Injecting bean instances in Servlets/EJBs

genman do-not-reply at jboss.com
Sun Sep 20 03:39:22 EDT 2009


Looked over the documentation but I didn't really see any explanation or recommendation for how deployed beans are supposed to be accessed through Servlet deployments. Is JNDI the suggested way? Is there support for @javax.annotation.Resource tags for accessing your own beans? (I wonder how JBoss AS implements @Resource...)

JNDI might be okay. If so, how can I be sure the Servlet is initialized AFTER my bean is?

I guess I'm really after something like what Web Beans promises, which is integration of POJOs/dependency injection with JEE.

As an aside, I don't really see any code sharing between Microcontainer, Seam/Web Beans, which is odd, considering the functionality is in many ways similar.

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

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



More information about the jboss-user mailing list