I don't think this is a good example of payload usage. IMO it would make
to change the MessageInterpolator.Context class and add the validated bean
type to this
On a tangent, Hibernate Validator introduced the concept of a
which could be useful for your described use case as well.
As far as I remember the inclusion of such an interface or more general
the separation of
MessageResolver and MessageInterpolator are on the agenda of BV 1.1.
On Tue, 20 Sep 2011 17:02:07 +0200, Ed Burns <edward.burns(a)oracle.com>
I understand this may be off topic, but I am not sure how to best bring
this to your attention, so please excuse this email.
GlassFish uses JSR-303 for ensuring that its configuration information
is valid. In the course of this usage, we ran into an apparent
shortcoming in the JSR-303 spec regarding ClassLoaders and the
Validation.properties ResourceBundle. A succint writeup of the problem
is at  but in 140 characters or less, the problem is:
In a MessageInterpolatorImpl, I need a reference to the .class to
which the constraint is applied, *without using payload*.
In other words, can we make the default value of the payload attribute
be the .class to which the constraint is applied?