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 <devn...@safir-wid.de>:

> 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 <t:saveState  in order to keep
> request scoped beans over a couple of jsf-sites.
>
> In the migrated applicaton we want to get rid of tomahawk and replace the
> <t:saveSate  with something like @ViewAccessScoped
>
> 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 <andraschko.tho...@gmail.com>
> Gesendet: Mittwoch, 28. August 2019 16:03
> An: MyFaces Discussion <users@myfaces.apache.org>
> 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 <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.StartupServletContextListene
> > r</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</pa
> > ram-name>
> >
> > <param-value>org.apache.myfaces.config.annotation.NoInjectionAnnotatio
> > nLifecycleProvider</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
> >
>
> --
> This email was Malware checked by UTM 9. http://www.sophos.com
>

Reply via email to