users@javaserverfaces-spec-public.java.net

[jsr372-experts mirror] [jsr372-experts] Re: Re: [1311-FacesContextCDI] Let CDI handle #{facesContext}

From: Leonardo Uribe <leonardo.uribe_at_irian.at>
Date: Tue, 7 Oct 2014 18:17:58 -0500

Hi

AT>> It's a different discussion, but maybe we could look for
AT>> JSF 2.3 to standardize and/or simplify the SPI
AT>> requirements? I'm not 100% up to date with how the
AT>> SPI exactly works, but the Mojarra and MyFaces guys
AT>> can probably comment on this.

In MyFaces we have tried do not change the SPI integration
unless absolutely necessary. I can remember a change long
time ago in 2.0.2 or 2.0.5 that caused some trouble, but since
that time, only mayor versions include changes over that part.

There are two points that cause trouble to server vendors:

1. Classloading and resource loading.
2. Annotation Scanning.

If we can unify those two, that would be great, even if the impact
will be seen after some years.

regards,

Leonardo Uribe


2014-10-07 15:34 GMT-05:00 arjan tijms <arjan.tijms_at_gmail.com>:
> On Tue, Oct 7, 2014 at 8:23 PM, John Yeary <johnyeary_at_gmail.com> wrote:
>>
>> This is quite a discussion around CDI injection of the FacesContext. I see
>> the merits of using CDI and for one of my projects we were using CDI with
>> Mojarra. Everything was working well until we had to use WebSphere. The IBM
>> implementation of CDI + JSF was OpenWebBeans and MyFaces. We could use
>> Mojarra, but without CDI. If we wanted to use CDI we would have to use
>> MyFaces.
>
>
> Because of the container specific SPI that needs to be implemented for JSF
> to integrate well with some container services, swapping out JSF at the
> container level for an implementation from a different vendor is never
> trivial. WebSphere is particularly difficult as even upgrading to a newer
> MyFaces version isn't possible without losing this support (my guess is that
> may have modified the MyFaces implementation itself instead of implementing
> the SPI separately).
>
> It's a different discussion, but maybe we could look for JSF 2.3 to
> standardize and/or simplify the SPI requirements? I'm not 100% up to date
> with how the SPI exactly works, but the Mojarra and MyFaces guys can
> probably comment on this.
>
>
>>
>> We had written a number of components taking advantage of Mojarra. We
>> didn't want to have to have multiple implementations of our components for
>> Mojarra and MyFaces.
>
>
> Just curious, but why were the components specifically tied to Mojarra?
>
>
>>
>> 1. How do we deal with different CDI implementations? Is there going to be
>> a requirement that the CDI implementations must work with Mojarra, as well
>> as, MyFaces?
>
>
> As Manfred explained as well, there should not really be a need for an
> explicit requirement for this. JSF implementations should of course only use
> public CDI APIs (APIs that are defined by the CDI specification) and
> naturally not rely on anything that's specific for a given CDI
> implementation.
>
> But this is not really different from how things are today. JSF is already
> using other specs like BeanValidation, and since only public APIs are used
> any implementation of JSF works with any implementation of BeanValidation
> given that both have passed the TCK.
>
> Kind regards,
> Arjan Tijms
>