Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-1014

Not possible to configure cache with spring

    XMLWordPrintable

    Details

      Description

      Spring 4
      Resteasy 3.0.6
      Tomcat 7

      Are using the spring configuration with the contextloaderlistener.
      Have tried to configure server cache, http://docs.jboss.org/resteasy/docs/3.0.6.Final/userguide/html_single/#server_cache, but it's not apparent to me how, but could be a documentation issue.

      Cant seem to register ServerCacheFeature in any way.

      Current workaround:
      Have extended ServerCacheFeature and added @Named @Provider annotations.

      @Named
      @Provider
      public class MyCacheProvider extends ServerCacheFeature {
      

      This seems to work, but it's not picking up the infinispan configuration in this way (the param names are not available in configuration).

      <context-param>
              <param-name>server.request.cache.infinispan.config.file</param-name>
              <param-value>infinispan.xml</param-value>
          </context-param>
      
          <context-param>
              <param-name>server.request.cache.infinispan.cache.name</param-name>
              <param-value>MyCache</param-value>
          </context-param>
      

        Attachments

          Activity

            People

            Assignee:
            pjurak Petr Jurak (Inactive)
            Reporter:
            magnus.kvalheim Bård Magnus Kvalheim (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: