Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-645

Default web.xml for REST server has the wrong param-name for configuration property

    XMLWordPrintable

Details

    • Hide

      1. Put any infinispan configuration file in the deploy/WEB-INF/classes directory
      2. Make sure the file is referenced from the default web.xml file in deploy/WEB-INF
      3. Start server, server won't use the settings specified in the file. No error will be displayed either since the web module will use default settings for it's CacheManager

      Show
      1. Put any infinispan configuration file in the deploy/WEB-INF/classes directory 2. Make sure the file is referenced from the default web.xml file in deploy/WEB-INF 3. Start server, server won't use the settings specified in the file. No error will be displayed either since the web module will use default settings for it's CacheManager
    • Low

    Description

      The web.xml file in the rest module has the wrong param key for configuring infinispan (that or the scala file is the one that needs to change). In 4.1.0.FINAL it reads;

      <!-- specify your cache configuration file -->
      <init-param>
      <param-name>infinispan.configuration</param-name>
      <param-value>infinispan.xml</param-value>
      </init-param>

      If you put infinispan.xml under the classes folder for the webapp, the file will be ignored unless you change the param-name to infinispan.configuration
      The only way this works is if you change the param-name to "infinispan.config"
      which is what it is set to in the file (server/rest/src/main/scala/org/infinispan/rest/StartupListener.scala);

      http://fisheye.jboss.org/browse/Infinispan/trunk/server/rest/src/main/scala/org/infinispan/rest/StartupListener.scala?r1=2039&r2=2039&u=3

      17 override def init(cfg: ServletConfig) {
      18 super.init(cfg)
      19 val cfgFile = cfg getInitParameter "infinispan.config"
      20 if (cfgFile == null)
      21 ManagerInstance.instance = new DefaultCacheManager
      22 else

      { 23 ManagerInstance.instance = new DefaultCacheManager(cfgFile) 24 }

      Attachments

        Activity

          People

            manik_jira Manik Surtani (Inactive)
            sellhorn_jira Augusto Sellhorn (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: