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 Thu, 14 Nov 2013 18:03:24 GMT


Sergey Beryozkin commented on CXF-5309:

If you could take on a JAXRSInvoker test then it would be nice :-).
public class BookStoreWithValidationPerRequest  {
    private Map<String, BookWitthValidation> books = 
        Collections.singletonMap("123", new BookWitthValidation("CXF", 123L)); 
    private String id;
    public BookStoreWithValidationPerRequest() {

    public void setId(String id) { = id;

    public String getId() {
    public BookWithValidation getBook() {
        return books.get(id);

and JAXRSValidationInvoker will enforce that before BookStoreWithValidationPerRequest#getBook
is invoked, the exception will be thrown if BookStoreWithValidationPerRequest#id does not
match some validation rules.

You can create say JAXRSPerRequestValidationTest, copy the server setup from JAXRSClientServerValidationTest,
refer to BookStoreWithValidationPerRequest and drop a setResourceProvider call (so the default
per-request lifecycle mode will be activated) and then I guess add just a single test for
a start.

Give it a go please :-)
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