3 Replies Latest reply on Jan 23, 2010 4:09 PM by Celinio Fernandes

    [JBoss 6.0 M1] Weld to inject a session bean in a Struts action ?

    Celinio Fernandes Novice


      I just heard about Weld, JBoss's own implementation of CDI.


      From Struts 2, if i want to use a session bean, I need to do a prehistorical JNDI lookup to retrive an instance of it.

      Unfortunately I cannot inject session beans in my Struts 2 actions.


      I just quickly checked the JSR 330 (Dependency Injection for Java).

      It is not possible to annotate a session bean with @Name which is part of the javax.inject.Inject package, if i am not mistaken.

      This is still new for me so i am not 100% sure.


      In any case, what about Weld ? Would it work with Weld ?


      Thanks for helping.