This content has been marked as final. Show 2 replies
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...)
There is simple integration that I wrote for Servlet + MC usage:
JNDI might be okay. If so, how can I be sure the Servlet is initialized AFTER my bean is?
You can define explicit dependency.
Afaik WebModule - which is how we deploy servlets - has depends notion.
Although I would have to look where you define them.
You could also add it through jboss-dependency.xml:
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.
This is exactly what Kabir is working on now:
Thanks for the info.
I want my Web Beans. Really bad.