[ 
https://issues.apache.org/jira/browse/MYFACES-3797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13788125#comment-13788125
 ] 

Gerhard Petracek edited comment on MYFACES-3797 at 10/7/13 8:03 PM:
--------------------------------------------------------------------

it breaks 3rd party libs which check the types of converters and validators.
in most cases i've seen so far they don't expect the need of such check, if 
they created the converters and validators internally.
@performance the 1st patch was just a first draft which wasn't optimized for 
performance. the 2nd patch is optimized already and per default it just adds 2 
boolean-checks (-> no noticeable overhead). if you enable it, you only have a 
minor overhead which is smaller than the overhead you get with an external 
container (you know the numbers).

and such an adapter creates additional state, because you have to store the 
class of the real converter. otherwise the current "restoredObject = 
clazz.newInstance();" would lead to an empty instance of the adapter.


was (Author: gpetracek):
it breaks 3rd party libs which check the types of converters and validators.
in most cases i've seen so far they don't expect the need of such check, if 
they created the converters and validators internally.
@performance as mentioned before we can tweak the default case (e.g. caching 
the info if the feature is enabled. it's currently a first draft and not a 
fully optimized final version). if you enable it, you only have a minor 
overhead which is smaller than the overhead you get with an external container 
(you know the numbers).

and such an adapter creates additional state, because you have to store the 
class of the real converter. otherwise the current "restoredObject = 
clazz.newInstance();" would lead to an empty instance of the adapter.

> cdi support for converters and validators
> -----------------------------------------
>
>                 Key: MYFACES-3797
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3797
>             Project: MyFaces Core
>          Issue Type: New Feature
>          Components: JSR-344
>            Reporter: Gerhard Petracek
>            Assignee: Gerhard Petracek
>         Attachments: MYFACES-3797_2.patch, MYFACES-3797.patch
>
>
> with
>     <context-param>
>         
> <param-name>org.apache.myfaces.CONVERTER_INJECTION_ENABLED</param-name>
>         <param-value>true</param-value>
>     </context-param>
> and
>     <context-param>
>         
> <param-name>org.apache.myfaces.VALIDATOR_INJECTION_ENABLED</param-name>
>         <param-value>true</param-value>
>     </context-param>
> it should be possible to enable cdi support for converters/validators.
> we need the config, because it was postponed for the spec.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to