<div>hi hardy,</div><div><br></div><div>i know and recently we had the same discussion for deltaspike.</div><div><br></div><div>summary:</div><div>if you like to use a ResourceBundle, you can use it in your custom MessageResolver easily.</div>

<div>however, in some cases a custom implementation of ResourceBundle just adds complexity you might not need.</div><div>the MessageResolver interface defines an easy contract (key + local in and stored message out).</div>

<div><br></div><div>regards,</div><div>gerhard</div><div><br></div><br><br><div class="gmail_quote">2012/6/25 Hardy Ferentschik <span dir="ltr">&lt;<a href="mailto:hardy@hibernate.org" target="_blank">hardy@hibernate.org</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ok, I see the difference now. Your proposal goes away completely from bundles of messages and just takes a single message into consideration. Sure that works as well.<br>


What is in your opinion the big gain of MessageResolver over ResourceBundleLocator? Obviously a resource bundle does not have to be backed by a properties file, but you could<br>
return any custom bundle subclass you like. Are bundles not the general way i18n is approached in Java? It seems natural to &quot;bundle&quot; your custom validation messages per locale, or not?<br>
<span class="HOEnZb"><font color="#888888"><br>
--Hardy<br>
</font></span><div class="im HOEnZb"><br>
<br>
On Jun 24, 2012, at 1:40 PM, Gerhard Petracek wrote:<br>
<br>
&gt; hi hardy,<br>
&gt;<br>
&gt; maybe it isn&#39;t that obvious since a ResourceBundleLocator isn&#39;t only about resource-bundles - see [1] and [2] -&gt; i don&#39;t agree that it&#39;s a better name (since it&#39;s something slightly different).<br>


&gt; if we can&#39;t agree on MessageResolver, i would suggest MessageSource (similar to [3]).<br>
&gt;<br>
&gt; regards,<br>
&gt; gerhard<br>
&gt;<br>
&gt; [1] <a href="https://svn.apache.org/repos/asf/myfaces/extensions/validator/trunk/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/MessageResolver.java" target="_blank">https://svn.apache.org/repos/asf/myfaces/extensions/validator/trunk/core/src/main/java/org/apache/myfaces/extensions/validator/core/validation/message/resolver/MessageResolver.java</a><br>


&gt; [2] <a href="https://svn.apache.org/repos/asf/myfaces/extensions/cdi/tags/extcdi-1.0.5/jse-modules/message-module/api/src/main/java/org/apache/myfaces/extensions/cdi/message/api/MessageResolver.java" target="_blank">https://svn.apache.org/repos/asf/myfaces/extensions/cdi/tags/extcdi-1.0.5/jse-modules/message-module/api/src/main/java/org/apache/myfaces/extensions/cdi/message/api/MessageResolver.java</a><br>


&gt; [3] <a href="http://static.springsource.org/spring/docs/3.1.x/javadoc-api/org/springframework/context/MessageSource.html" target="_blank">http://static.springsource.org/spring/docs/3.1.x/javadoc-api/org/springframework/context/MessageSource.html</a><br>


<br>
<br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
beanvalidation-dev mailing list<br>
<a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/beanvalidation-dev</a><br>
</div></div></blockquote></div><br>