[infinispan-dev] Issue with JGroups config files in ispn-core

Dan Berindei dan.berindei at gmail.com
Fri Jul 11 05:26:46 EDT 2014


+1 to having a readable (and publicly advertised!) name for our default
JGroups configuration. I particularly like the default-jgroups-tcp.xml
proposal.

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

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.

Bela: we also support absolute path names and URLs AFAIK but I don't really
see a good use for those options.

Cheers
Dan



On Fri, Jun 13, 2014 at 10:09 AM, Alan Field <afield at redhat.com> wrote:

>
>
> ----- Original Message -----
> > From: "Martin Gencur" <mgencur at redhat.com>
> > To: "infinispan -Dev List" <infinispan-dev at lists.jboss.org>
> > Sent: Friday, June 13, 2014 7:36:10 AM
> > Subject: Re: [infinispan-dev] Issue with JGroups config files in
> ispn-core
> >
> > On 12.6.2014 20:14, Tristan Tarrant wrote:
> > > On 12/06/14 18:46, Dennis Reed wrote:
> > >> +1 to changing the name/directory.
> > >> -100 to changing the order of where it's looked for instead.
> > >>
> > >> All resource lookups should use the normal rules for finding
> resources.
> > >> Don't change standard behavior without a *very* good reason.
> > >>
> > >> Doing anything special (like META-INF/_internal/jgroups-udp.xml) is
> > >> completely non-intuitive
> > >> and will cause support issues down the road.
> > >> Using config/jgroups-udp.xml is standard, and would be immediately
> > >> understood by anyone.
> > >>
> > > Users don't even need to know that META-INF/_internal/blah actually
> > > exists. It is just an internal detail when using the "default" (i.e.
> > > just enable clustering without explicitly specifying a configuration
> file).
> >
> > My understanding was that users just take an example config. file (i.e.
> > jgroups-udp.xml), copy it into their application and modify. That's how
> > users get the same name for their configuration file as the default. So
> > in this case, they might find it again, even in
> > META-INF/_internal/jgroups.udp.xml :)
>
> 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
> "META-INF/example_configurations/jgroups/udp.xml". 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:
>
> 2014-06-12 06:45:02,871 [thread-name] INFO  [package-name] Using JGroups
> configuration file 'jar:META-INF/example_configurations/jgroups/udp.xml'
> 2014-06-12 06:45:02,871 [thread-name] INFO  [package-name] Using JGroups
> configuration file 'file:/app_home/config/jgroups-udp.xml'
>
> This would make it more obvious to the user which configuration file is in
> use.
>
> Thanks,
> Alan
>
>
> >
> > Martin
> >
> >
> > >
> > > Tristan
> > > _______________________________________________
> > > infinispan-dev mailing list
> > > infinispan-dev at lists.jboss.org
> > > https://lists.jboss.org/mailman/listinfo/infinispan-dev
> >
> > _______________________________________________
> > infinispan-dev mailing list
> > infinispan-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/infinispan-dev
> >
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20140711/858cd414/attachment-0001.html 


More information about the infinispan-dev mailing list