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

Sergey Beryozkin edited comment on CXF-5309 at 11/3/13 5:58 PM:
----------------------------------------------------------------

Hi Andriy,

Thanks. By the way, I forgot to clarify that updated the interceptors to throw 
the exceptions if they could not do their work,  as the application code will 
actually depend on them and avoid the manual validation. 

Good point about preserving the arg names, I saw the log messages.

Not sure about the spring injection, I think it is already covered. 
AbstractValidatingInterceptor has a public setter accepting ValidationProvider; 
users can also inject it via a property, say in jaxrs:properties. The default 
initialization will only be needed if the provider has not been injected. In 
most cases I'd expect both in & put interceptors sharing the same provider 
instance injected into both of them via Spring/etc.

Can you also please play with with the case where we have a JAX-RS root 
resource class extending an abstract class or implementing an interface, with 
JAX-RS annotations being on the implementation class only and Bean Validation 
exceptions being in the abstract class or interface. Chapter 7 mentions cases 
like this (in context of the annotation inheritance), I wonder whether CXF 
needs to do something about it or Hibernate  will discover the inherited 
annotations itself.   

Thanks, Sergey 


was (Author: sergey_beryozkin):
Hi Andriy,

Thanks. By the way, I forget to clarify that updated the interceptors to throw 
the exceptions if they could not do their work,  as the application code will 
actually depend on them and avoid the manual validation. 

Good point about preserving the arg names, I saw the log messages.

Not sure about the spring injection, I think it is already covered. 
AbstractValidatingInterceptor has a public setter accepting ValidationProvider; 
users can also inject it via a property, say in jaxrs:properties. The default 
initialization will only be needed if the provider has not been injected. In 
most cases I'd expect both in & put interceptors sharing the same provider 
instance injected into both of them via Spring/etc.

Can you also please play with with the case where we have a JAX-RS root 
resource class extending an abstract class or implementing an interface, with 
JAX-RS annotations being on the implementation class only and Bean Validation 
exceptions being in the abstract class or interface. Chapter 7 mentions cases 
like this (in context of the annotation inheritance), I wonder whether CXF 
needs to do something about it or Hibernate  will discover the inherited 
annotations itself.   

Thanks, Sergey 

> Support Bean Validation API for JAX-RS
> --------------------------------------
>
>                 Key: CXF-5309
>                 URL: https://issues.apache.org/jira/browse/CXF-5309
>             Project: CXF
>          Issue Type: Sub-task
>          Components: JAX-RS, JAX-WS Runtime
>            Reporter: Sergey Beryozkin
>         Attachments: patch-validation-poc.txt
>
>




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

Reply via email to