Could you give some more details on this second interface and the
advanced use cases you have in mind?
2012/7/2 Gunnar Morling <gunnar(a)hibernate.org>:
Am 30.06.2012 13:46 schrieb "Gerhard Petracek"
> hi hardy,
> thx for moving it to an own thread!
> a copy of my last answer:
> it's just about:
> - an interface which directly allows simple but still flexible custom
> implementations of (custom) message-sources (including a simple delegation
> to a ResourceBundle) - see .
> - an interface which is restricted to ResourceBundle. -> if it isn't
> possible to use ListResourceBundle or PropertyResourceBundle, users have to
> implement #getKeys which might not be possible (/ that easy) for some
> advanced use-cases.
What's that 2nd interface required for? Wouldn't it suffice to do all
lookups via the first interface and demand in the spec, that the default
implementation of that interface returns values based on the
What are the advanced use cases you have in mind?
> the rest is more or less the same - if the MessageInterpolator receives a
> key, it uses the new interface for the lookup (if there is no custom
> implementation of the new interface or no result for the given key, the
> existing default bundle (ValidationMessages) is used as a fallback).
Sounds reasonable to me. We should expose the default implementation of the
interface during bootstrap so that custom implementations can also delegate
> 2012/6/26 Hardy Ferentschik <hardy(a)hibernate.org>
>> On Jun 26, 2012, at 8:21 AM, Gunnar Morling wrote:
>> > I thin I've not yet totally understood what you have in mind.
>> AFAIU Gerhard proposes a more general interface which is independent from
>> ResourceBundles. Underneath you still can use them, in fact you would have
>> to for
>> ValidationMessages.properties. We would have to to define the
>> MessageResolver interface and then also define that the default
>> implementation of this interface
>> resolves against ValidationMessages.properties. Even with the
>> ResourceBundleLocator interface you need to somehow specify that a default
>> implementation exists
>> which uses ValidationMessages.properties. Is this what you have in mind
>> > Maybe you could create a proposal for BVAL-217 describing things more
>> > in detail (interaction between resolver and interpolator, integration with
>> > BV 1.0 interpolators etc.)?
>> +1 That would be the best.
>> > I also think using resource bundles is not totally optional as there is
>> > the ValidationMessages bundle.
>> Right. For that reason using ResourceBundleLocator still feels a little
>> more "natural" to me.
>> beanvalidation-dev mailing list
> beanvalidation-dev mailing list