+1 for Tristan's approach to look in the modules in a specific (and correct) order: Infinispan core jar is last.
But you don't need to rename it. BTW this relates to the thread I opened a while back pointing out that the configuration parser needs to expose on the API the classloader I want it to load configuration files from, which is not necessarily the same as the module where the Parser needs to load its own extensions from. On 12 June 2014 14:46, Bela Ban <[email protected]> wrote: > Does Infinispan actually also support other location formats, such as > the following ? > > - http://www.host.com/configs/jgroups-udp.xml // URLs > - /home/bela/jgroups-udp.xml > > On 12/06/14 15:32, Tristan Tarrant wrote: >> Actually my idea is: >> >> I specify I want jgroups-udp.xml >> so first of all I look at the classpath root: if I find the file there I >> use it, otherwise I see if it is in (proposed) >> META-INF/_internal/jgroups-udp.xml >> >> Tristan >> >> On 12/06/14 14:44, Alan Field wrote: >>> Tristan, >>> >>> So the server and library configuration parsers will handle something like >>> this? >>> >>> <jgroups> >>> <stack-file name="jgroupsStack" path="config/jgroups-udp.xml"/> >>> </jgroups> >>> >>> If this is true, then I agree that this is a good solution as well. >>> >>> Thanks, >>> Alan >>> >>> ----- Original Message ----- >>>> From: "Tristan Tarrant" <[email protected]> >>>> To: "infinispan -Dev List" <[email protected]> >>>> Sent: Thursday, June 12, 2014 2:37:22 PM >>>> Subject: Re: [infinispan-dev] Issue with JGroups config files in ispn-core >>>> >>>> I think the "internal" jgroups files should be "moved" to a separate >>>> directory within the core jar, to be searched after the "root". So the >>>> user can still provide a jgroups-udp.xml and it won't conflict. >>>> >>>> Tristan >>>> >>>> On 12/06/14 14:30, Martin Gencur wrote: >>>>> Hi, >>>>> let me mention an issue that several people faced in the past, >>>>> independently of each other: >>>>> >>>>> A user app uses a custom JGroups configuration file. However, they >>>>> choose the same name as the files which we bundle inside >>>>> infinispan-core.jar. >>>>> Result? People are wondering why their custom configuration does not >>>>> take effect. >>>>> Reason? Infinispan uses the default jgroups file bundled in >>>>> infinispan-core >>>>> Who faced the issue? (I suppose it's just a small subset:)) Me, Radim, >>>>> Alan, Wolf Fink >>>>> >>>>> I believe a lot of users run into this issue. >>>>> >>>>> We were considering a possible solution and this one seems like it could >>>>> work (use both 1) and 2)): >>>>> 1) rename the config files in the distribution e.g. this way: >>>>> jgroups-ec2.xml -> default-jgroups-ec2.xml >>>>> jgroups-udp.xml -> default-jgroups-udp.xml >>>>> jgroups-tcp.xml -> default-jgroups-tcp.xml >>>>> >>>>> Any other suggestions? internal-jgroups-udp.xml ? >>>>> dontEverUseThisFileInYourAppAsTheCustomConfigurationFile-jgroups-udp.xml >>>>> ? (joke) >>>>> (simply something that users would automatically like to change once >>>>> they use it in their app) >>>>> >>>>> 2) Throw a warning whenever a user wants to use a custom jgroups >>>>> configuration file that has the same name as one of the above >>>>> >>>>> >>>>> WDYT? >>>>> >>>>> Thanks! >>>>> Martin >>>>> >>>>> _______________________________________________ >>>>> infinispan-dev mailing list >>>>> [email protected] >>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev >>>>> >>>>> >>>> _______________________________________________ >>>> infinispan-dev mailing list >>>> [email protected] >>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev >>>> >>> _______________________________________________ >>> infinispan-dev mailing list >>> [email protected] >>> https://lists.jboss.org/mailman/listinfo/infinispan-dev >>> >>> >> >> _______________________________________________ >> infinispan-dev mailing list >> [email protected] >> https://lists.jboss.org/mailman/listinfo/infinispan-dev >> > > -- > Bela Ban, JGroups lead (http://www.jgroups.org) > _______________________________________________ > infinispan-dev mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/infinispan-dev _______________________________________________ infinispan-dev mailing list [email protected] https://lists.jboss.org/mailman/listinfo/infinispan-dev
