Hi, in generell it's up to the container or the CDI impl, to add CDI support to JSF =< 2.2 via a ELResolver. In JSF 2.3 the direct support of the BeanManager#getELResolver was added (see MyFaces' 2.3 ResolverBuilderForFaces).
In OpenWebBeans we did it within a wrapped JSF Application-Object: https://github.com/apache/openwebbeans/blob/owb_1.2.x/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/OwbApplication.java Maybe you should ask the Wildfly guys. Not sure if it should just work on WildFly OOTB with Mojarra. Best regards, Thomas Am Mi., 28. Aug. 2019 um 15:46 Uhr schrieb DevNews <devn...@safir-wid.de>: > Hallo, > > In a small example Project we want to test the CDI-definition of managed > Beans. > We want to use myfaces2.2.8 and deploy to WildFly13. > > If we use the jsf version that is shipped with WildFly (mojarra2.2) the > project works. > If we use myfaces the request-scoped bean is not resolved an the project > fails without further Exceptions. > > With myfaces we use the following web.xml: > <?xml version="1.0" encoding="UTF-8"?> > <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns="http://java.sun.com/xml/ns/javaee" > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" > id="WebApp_ID" version="2.5"> > > <context-param> > <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name> > <param-value>true</param-value> > </context-param> > > <servlet> > <servlet-name>Faces Servlet</servlet-name> > <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> > <load-on-startup>0</load-on-startup> > </servlet> > <servlet-mapping> > <servlet-name>Faces Servlet</servlet-name> > <url-pattern>*.jsf</url-pattern> > </servlet-mapping> > > <session-config> > <session-timeout>60</session-timeout> > </session-config> > <welcome-file-list> > <welcome-file>/index.html</welcome-file> > </welcome-file-list> > > <listener> > > <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> > </listener> > </web-app> > > To get the project started with JSF-managed Beans > (@javax.faces.bean.RequestScoped)we have to add the following > configuration-parameter: > > <context-param> > > <param-name>org.apache.myfaces.config.annotation.LifecycleProvider</param-name> > > <param-value>org.apache.myfaces.config.annotation.NoInjectionAnnotationLifecycleProvider</param-value> > </context-param> > > summary: > > mojarra with CDI-beans works > myfaces with JSF-managed beans works > myfaces with CDI-beans fails > > Any idea? > > Thanks Georg > > > > Tel: > E-Mail: devn...@safir-wid.de > Internet: https://www.safir-wid.de > > safir Wirtschaftsinformationsdienst GmbH > Sitz der Gesellschaft: Möllendorffstr.49, 10367 Berlin > Geschäftsführer: Thilo Kind > Registergericht: Amtsgericht Berlin Charlottenburg, HRB 66681 > USt-ID: DE 193584747 > > > > > -- > This email was Malware checked by UTM 9. http://www.sophos.com >