<div dir="ltr">+1 to having a readable (and publicly advertised!) name for our default JGroups configuration. I particularly like the default-jgroups-tcp.xml proposal.<div><br></div><div>We always chastise users for going with their own configuration inherited from their Infinispan 4.0 days instead of starting with our default configuration and only modifying the settings that they really need. It would be much harder for the users to believe our advice if we call our configuration META-INF/we-dont-want-you-to-see-this/jgroups-tcp.xml</div>

<div><br></div><div>I vote to just log a warning on startup if we find look up the configuration file name in the classpath and find more than one match.</div><div><br></div><div>Bela: we also support absolute path names and URLs AFAIK but I don&#39;t really see a good use for those options.</div>

<div><br></div><div>Cheers</div><div>Dan</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 13, 2014 at 10:09 AM, Alan Field <span dir="ltr">&lt;<a href="mailto:afield@redhat.com" target="_blank">afield@redhat.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><br>
<br>
----- Original Message -----<br>
&gt; From: &quot;Martin Gencur&quot; &lt;<a href="mailto:mgencur@redhat.com">mgencur@redhat.com</a>&gt;<br>
&gt; To: &quot;infinispan -Dev List&quot; &lt;<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a>&gt;<br>
</div><div class="">&gt; Sent: Friday, June 13, 2014 7:36:10 AM<br>
&gt; Subject: Re: [infinispan-dev] Issue with JGroups config files in ispn-core<br>
&gt;<br>
</div><div class="">&gt; On 12.6.2014 20:14, Tristan Tarrant wrote:<br>
&gt; &gt; On 12/06/14 18:46, Dennis Reed wrote:<br>
&gt; &gt;&gt; +1 to changing the name/directory.<br>
&gt; &gt;&gt; -100 to changing the order of where it&#39;s looked for instead.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; All resource lookups should use the normal rules for finding resources.<br>
&gt; &gt;&gt; Don&#39;t change standard behavior without a *very* good reason.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Doing anything special (like META-INF/_internal/jgroups-udp.xml) is<br>
&gt; &gt;&gt; completely non-intuitive<br>
&gt; &gt;&gt; and will cause support issues down the road.<br>
&gt; &gt;&gt; Using config/jgroups-udp.xml is standard, and would be immediately<br>
&gt; &gt;&gt; understood by anyone.<br>
&gt; &gt;&gt;<br>
&gt; &gt; Users don&#39;t even need to know that META-INF/_internal/blah actually<br>
&gt; &gt; exists. It is just an internal detail when using the &quot;default&quot; (i.e.<br>
&gt; &gt; just enable clustering without explicitly specifying a configuration file).<br>
&gt;<br>
&gt; My understanding was that users just take an example config. file (i.e.<br>
&gt; jgroups-udp.xml), copy it into their application and modify. That&#39;s how<br>
&gt; users get the same name for their configuration file as the default. So<br>
&gt; in this case, they might find it again, even in<br>
&gt; META-INF/_internal/jgroups.udp.xml :)<br>
<br>
</div>I agree that defining the order that configuration files are loaded is important and should be defined. I would prefer a more readable path like &quot;META-INF/example_configurations/jgroups/udp.xml&quot;. This also gives us a good location to provide example cache configuration files as well. I also think that a message should be logged with the path to the configuration file being used:<br>


<br>
2014-06-12 06:45:02,871 [thread-name] INFO  [package-name] Using JGroups configuration file &#39;jar:META-INF/example_configurations/jgroups/udp.xml&#39;<br>
2014-06-12 06:45:02,871 [thread-name] INFO  [package-name] Using JGroups configuration file &#39;file:/app_home/config/jgroups-udp.xml&#39;<br>
<br>
This would make it more obvious to the user which configuration file is in use.<br>
<br>
Thanks,<br>
Alan<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
&gt;<br>
&gt; Martin<br>
&gt;<br>
&gt;<br>
&gt; &gt;<br>
&gt; &gt; Tristan<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; infinispan-dev mailing list<br>
&gt; &gt; <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; infinispan-dev mailing list<br>
&gt; <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
&gt;<br>
_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
</div></div></blockquote></div><br></div>