0 Replies Latest reply: Oct 30, 2013 6:50 AM by pentike RSS

    WeblogicInjectionProvider not injecting @EJB

    pentike

      Hi All,

       

      I have read through the forums related to this issue

      JSF 2.x in weblogic 10.3.0 is not working

      The Buttso Blathers: JSF with Managed Beans and Dependency Injection and WebLogic Server

      jsf - Injecting EJB3.0 Beans into JSF2.0 Backing Beans... Impossible? - Stack Overflow

       

      The server is Weblogic 11.0.3.5. The web application uses RichFaces 4.3.4 and Spring 3.0.5.

      EDIT: jsf-api and jsf-impl are project dependencies with version 2.1.5

      wls.jsf.di.jar is added as dependency to the project.

       

      In order to make sure that the appropriate injection provider is used, I have made a subclass of WeblogicInjectionProvider
      import com.bea.faces.WeblogicInjectionProvider;

      ...

      public class MyInjectionProvider extends WeblogicInjectionProvider {

      @Override

      public void inject(Object bean) throws InjectionProviderException {

               super.inject(bean);

           }

      }

       

      I have declared this as InjectionProvider in web.xml

      <context-param>

              <param-name>com.sun.faces.injectionProvider</param-name>

              <param-value>com.ish.tmc.presentation.sandbox.MyInjectionProvider</param-value>

      </context-param>


      The super.inject(bean); line is called (if I put a breakpoint on it the debugger stops) and the managed bean is passed as parameter but the fields annotated with @EJB in the bean remains null.


      Unfortunately I am stuck here since I don't have access to the source code of WeblogicInjectionProvider.


      Any ideas?


      Thanks in advance!

      Gábor