cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <>
Subject [jira] [Commented] (CXF-5309) Support Bean Validation API for JAX-RS
Date Wed, 13 Nov 2013 10:51:25 GMT


Sergey Beryozkin commented on CXF-5309:

Hi Andriy, thanks for the last 2 patches, I'll work on them shorty.

Regarding the parameter name handler injection, should we also support a setter ? The constructor
injection is fine (lets keep this single new constructor), but we'd need to have more constructors
added to cover the cases where we have multiple providers available, given that the provider
has additional constructors for supporting non-default factory initializations and doing the
constructor injection with more than 1 arg when it might be needed is not easy from Spring

What about additionally supporting a setter and then, for example,  
private< T > Set<ConstraintViolation< T > > doValidateBean(final T bean)
        return getValidator().validate(bean);
private ExecutableValidator getExecutableValidator() {
       return getValidator().forExecutables();

private Validator getValidator() {
       if (paramHandler != null) {
           return factory.usingContext().parameterNameProvider(paramHandler).getVaidator();
       } else {
           return factory.getValidator();

Will it work for you ?
Thanks, Sergey

> Support Bean Validation API for JAX-RS
> --------------------------------------
>                 Key: CXF-5309
>                 URL:
>             Project: CXF
>          Issue Type: Sub-task
>          Components: JAX-RS, JAX-WS Runtime
>            Reporter: Sergey Beryozkin
>         Attachments: patch-validation-exception-mapper.txt, patch-validation-paramnameprovider.txt,
patch-validation-poc.txt, patch-validation-spring-tests.txt, patch-validation-tests.txt

This message was sent by Atlassian JIRA

View raw message