[infinispan-issues] [JBoss JIRA] (ISPN-4499) Prevent shadowing user-defined jgroups configuration file

Martin Gencur (JIRA) issues at jboss.org
Fri Jul 11 02:57:25 EDT 2014


     [ https://issues.jboss.org/browse/ISPN-4499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Gencur updated ISPN-4499:
--------------------------------

    Description: 
When users create their own JGroups configuration file and name it the same way as default configuration files (jgroups-udp.xml / jgroups-tcp-xml / jgroups-ec2.xml), they might not be visible to the user application as they're shadowed by the default configuration files.

Proposed solution:
* place current jgroups configuration files into META-INF/configs folder (this folder doesn't have to have an obscure name such as "_internal" because of the following two points which complement the solution)
* define order in which the config files are read by class loader (i.e. first scan user application, then path under META-INF/configs)
* when Infinispan is started, log the path to the configuration file used, e.g.:
{code}
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'
{code}

  was:
When users create their own JGroups configuration file and name it the same way as default configuration files (jgroups-udp.xml / jgroups-tcp-xml / jgroups-ec2.xml), they might not be visible to the user application as they're shadowed by the default configuration files.

Proposed solution:
* place current jgroups configuration files into META-INF/configs folder
* define order in which the config files are read by class laoder (i.e. first scan user application, then path under META-INF/configs)
* when Infinispan is started, log the path to the configuration file used, e.g.:
{code}
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'
{code}



> Prevent shadowing user-defined jgroups configuration file
> ---------------------------------------------------------
>
>                 Key: ISPN-4499
>                 URL: https://issues.jboss.org/browse/ISPN-4499
>             Project: Infinispan
>          Issue Type: Enhancement
>      Security Level: Public(Everyone can see) 
>          Components: Configuration
>    Affects Versions: 7.0.0.Alpha4
>            Reporter: Martin Gencur
>            Assignee: Martin Gencur
>
> When users create their own JGroups configuration file and name it the same way as default configuration files (jgroups-udp.xml / jgroups-tcp-xml / jgroups-ec2.xml), they might not be visible to the user application as they're shadowed by the default configuration files.
> Proposed solution:
> * place current jgroups configuration files into META-INF/configs folder (this folder doesn't have to have an obscure name such as "_internal" because of the following two points which complement the solution)
> * define order in which the config files are read by class loader (i.e. first scan user application, then path under META-INF/configs)
> * when Infinispan is started, log the path to the configuration file used, e.g.:
> {code}
> 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'
> {code}



--
This message was sent by Atlassian JIRA
(v6.2.6#6264)


More information about the infinispan-issues mailing list