dev@jsr311.java.net

jsr-303 alignment

From: Dhanji R. Prasanna <dhanji_at_gmail.com>
Date: Wed, 5 Sep 2007 12:31:44 +1000

Hi

We've just had a bit of discussion in the 303 EG concerning the integration
of jsr303's runtime (it is a core/SE api) into various consumers. I know the
question was raised a bit earlier on this list, and deferred until such time
as 303 got its (our) act together regarding integration.

The consensus is tentatively that each consumer (jsr311, faces, JPA, etc.)
will bootstrap and invoke/integrate a unique instance of the jsr303 runtime.
We are not mandating this as part of the spec but that is expected to be the
modus operandi.

This has the following implications:

- jsr311's runtime bootstraps jsr303 runtime at startup
- the JIT/other caching done by jsr303's runtime will warm up according to
the usage pattern of the jsr311 application
- jsr311 needs to define its own lifecycle around when/how validation is
invoked on a Resource/Entity instance
- jsr311 needs to define how validation errors will be translated into the
response (if at all)

An *initial* reaction suggests that we should leave this entirely to a user
(bootstrap, validate, feedback error). However, since I recall Paul saying
we want jsr311 to be a complete *usable* API it might be worth considering
if/whether we want to integrate jsr303 in some (even optional) way. For
instance, in the Response.Builder.

I can explain a bit more about how bean validation in jsr303 works if anyone
is interested. Thoughts?

Dhanji.