users@javaserverfaces-spec-public.java.net

[jsr344-experts mirror] Re: CDI injection in faces converters

From: arjan tijms <arjan.tijms_at_gmail.com>
Date: Tue, 15 Oct 2013 22:08:33 +0200

Hi Gerhard,

Just wondering, did you test your implementation of injection into
converters and validators with an EAR?

When implementing this feature for OmniFaces, it appeared to be rather
troublesome in EARs. As far as we could see the issues were attributed to
the way the CDI spec and extensions work in combination with an EAR. See
Bauke's blog for additional details:
http://balusc.blogspot.com/2013/10/cdi-behaved-unexpectedly-in-ear-so.html

Kind regards,
Arjan



On Tue, Oct 15, 2013 at 8:58 PM, Gerhard Petracek <
gerhard.petracek_at_gmail.com> wrote:

> hi arjan,
>
> fyi: the approach in myfaces-core and deltaspike doesn't have the
> limitations which caused the deferral.
> the only known restriction is that it isn't compatible with jsf 1.x.
>
> -> it will be our suggestion for jsf 2.3.
>
> regards,
> gerhard
>
>
>
> 2013/10/15 arjan tijms <arjan.tijms_at_gmail.com>
>
>> Hi,
>>
>> It was indeed postponed in JSF 2.2 due to some last minute complication
>> that was found.
>>
>> We have however implemented CDI injection for converters and validators
>> in OmniFaces. See http://showcase.omnifaces.org/cdi/FacesConverter and
>> http://showcase.omnifaces.org/cdi/FacesValidator
>>
>> Kind regards,
>> Arjan Tijms
>>
>>
>>
>>
>>
>> On Tue, Oct 15, 2013 at 1:28 PM, Gerhard Petracek <
>> gerhard.petracek_at_gmail.com> wrote:
>>
>>> hi dirk,
>>>
>>> yes - it was postponed.
>>> however, since i've committed it to apache myfaces-core (as an optional
>>> feature)
>>> as well as to apache deltaspike (-> you can also use it with mojarra),
>>> it will be available soon.
>>>
>>> regards,
>>> gerhard
>>>
>>>
>>>
>>> 2013/9/8 Dirk Weil <dirk.weil_at_gedoplan.de>
>>>
>>>> Are CDI injections supported in JSF 2.2 converters and validators?****
>>>>
>>>> ** **
>>>>
>>>> I thought they were, but at least injections in
>>>> @FacesConverter(forClass = xxx.class) annotated converters are not executed
>>>> on GLF 4.0.1 (Mojarra 2.2.2). Now I found some forum entries saying
>>>> injections didn’t make it into JSF 2.2. What is correct?****
>>>>
>>>> ** **
>>>>
>>>> Thanks for any clarification!****
>>>>
>>>> Dirk****
>>>>
>>>
>>>
>>
>