Re: CDI-Bean in myfaces2.2 is not resolved
I think this are different problems. The problem before was that there was no CDI-ELResolver registred in JSF, so JSF could not resolve ANY CDI bean. | Does it mean that we should not use deltaSpike with WildFly? DeltaSpike should work on any server. Maybe you miss something like ds:windowId. Just check the DS docu a bit and maybe use the DS mailinglist. | And is there another possibility to get a Bean behave like ViewAccessSoped? Not really. Conversation or SessionScoped can be used as "alternative". Am Do., 29. Aug. 2019 um 13:01 Uhr schrieb DevNews : > HI Thomas, > > thank you for the fast answer. > > We want to prepare a migration of a large JSF1.2 application with several > hundred jsf-sites to JSf2.x. > In this application we use tomahawk request scoped beans over a couple of jsf-sites. > > In the migrated applicaton we want to get rid of tomahawk and replace the > > Back to our small test project: > > According to your answer we switched from myfaces to mojarra. > In this case the CDI-lookup to a CDI-ConversationScoped bean worked. > > Then we added deltaSpike jars to the (mojarra) application. > The application still worked. > > Then we changed our bean from @ConversationScoped to > @org.apache.deltaspike.core.api.scope.ViewAccessScoped. > In this case the application behaves as if we used myfaces before. The > CDI-Bean is not found by the WebServer. > > Is this the same problem as before? > > If yes: > > - Does it mean that we should not use deltaSpike with WildFly? > - And is there another possibility to get a Bean behave like > ViewAccessSoped? > > 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 > > > > -----Ursprüngliche Nachricht- > Von: Thomas Andraschko > Gesendet: Mittwoch, 28. August 2019 16:03 > An: MyFaces Discussion > Betreff: Re: CDI-Bean in myfaces2.2 is not resolved > > 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 : > > > 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: > > > 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"> > > > > > > org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL > > true > > > > > > > > Faces Servlet > > javax.faces.webapp.FacesServlet > > 0 > > > > > > Faces Servlet > > *.jsf > > > > > > 60 > > > > > > /index.html > > > > > > > > > > org.apache.myfaces.webapp.StartupServletContextListene > > r > > > > > > > > To get the project started with JSF-managed Beans > > (@javax.faces.bean.RequestScoped)we have to add the following > > configuration-parameter: > > > > > > > > org.apache.myfaces.config.annotation.LifecycleProvider > ram-name> > > > > org.apache.myfaces.config.annotation.NoInjectionAnnotatio > > nLifecycleProvider > > > > > > 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 > > > > -- > This email was Malware checked by UTM 9. http://www.sophos.com >
AW: CDI-Bean in myfaces2.2 is not resolved
HI Thomas, thank you for the fast answer. We want to prepare a migration of a large JSF1.2 application with several hundred jsf-sites to JSf2.x. In this application we use tomahawk 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 -Ursprüngliche Nachricht- Von: Thomas Andraschko Gesendet: Mittwoch, 28. August 2019 16:03 An: MyFaces Discussion Betreff: Re: CDI-Bean in myfaces2.2 is not resolved 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 : > 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: > 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"> > > > org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL > true > > > > Faces Servlet > javax.faces.webapp.FacesServlet > 0 > > > Faces Servlet > *.jsf > > > 60 > > > /index.html > > > > > org.apache.myfaces.webapp.StartupServletContextListene > r > > > > To get the project started with JSF-managed Beans > (@javax.faces.bean.RequestScoped)we have to add the following > configuration-parameter: > > > > org.apache.myfaces.config.annotation.LifecycleProvider ram-name> > > org.apache.myfaces.config.annotation.NoInjectionAnnotatio > nLifecycleProvider > > > 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 > -- This email was Malware checked by UTM 9. http://www.sophos.com
Re: CDI-Bean in myfaces2.2 is not resolved
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 : > 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: > > 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"> > > > org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL > true > > > > Faces Servlet > javax.faces.webapp.FacesServlet > 0 > > > Faces Servlet > *.jsf > > > > 60 > > > /index.html > > > > > org.apache.myfaces.webapp.StartupServletContextListener > > > > To get the project started with JSF-managed Beans > (@javax.faces.bean.RequestScoped)we have to add the following > configuration-parameter: > > > > org.apache.myfaces.config.annotation.LifecycleProvider > > org.apache.myfaces.config.annotation.NoInjectionAnnotationLifecycleProvider > > > 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 >
CDI-Bean in myfaces2.2 is not resolved
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: 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"> org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL true Faces Servlet javax.faces.webapp.FacesServlet 0 Faces Servlet *.jsf 60 /index.html org.apache.myfaces.webapp.StartupServletContextListener To get the project started with JSF-managed Beans (@javax.faces.bean.RequestScoped)we have to add the following configuration-parameter: org.apache.myfaces.config.annotation.LifecycleProvider org.apache.myfaces.config.annotation.NoInjectionAnnotationLifecycleProvider 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