users@jersey.java.net

Re: [Jersey] Using JSR-303 (bean validation) with Jersey

From: Tatu Saloranta <tsaloranta_at_gmail.com>
Date: Wed, 15 Apr 2009 11:52:03 -0700

On Wed, Apr 15, 2009 at 12:54 AM, James Strachan
<james.strachan_at_gmail.com> wrote:
> 2009/4/14 Tatu Saloranta <tsaloranta_at_gmail.com>:
...
>> Right: I don't think there has to be anything, since validation is
>> about as simple as it gets. You need to construct a Validator using
>> the usual factory-factory-factory-provider pattern (ok maybe a few
>> factories less than that), but then just call
>> "Validator.validate(beanToValidate)" and get a set of typed
>> ConstraintViolation objects. So that's easily pluggable.
>
> Agreed. It might be handy to create a helper Guice module or Spring
> factory bean to help construct a properly configured Validator which
> is all setup nicely for use with Jersey.

Exactly. I think there's some overlap between people involved with
those (like Bob participating in bean validation jsr, I think), so it
should be easy to connect the dots.

-+ Tatu +-