Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-3694

Clean up EHCache configuration mess

    XMLWordPrintable

    Details

    • Attachments:
      0
    • Comments:
      10
    • Documentation Status:
      Not Required

      Description

      • EHCache defaults to phoning home for the latest version number every time it is initialized.  This causes entirely unnecessary delays and log noise, which are repeated within looping code in some circumstances.  We should turn this off.  That has been attempted before (see linked ticket) but apparently we have not covered all cases.
      • dspace-services:spring/spring-dspace-core-services.xml creates an EHCache CacheManager and injects CachingServiceImpl with it, @Required.  Why do we then test whether it was injected and, if not, do the same thing again?  We should remove one or the other, probably the latter.
      • Why do we use a nondefault name (ehcache-config.xml) for the EHCache configuration instead of just letting EHCache look for the default (ehcache.xml)?
      • We should not be using system properties for things like this in webapp.s, because they will affect all subsequently loaded webapp.s too.
      • We have yet another file:  config/hibernate-ehcache-config.xml, which also sets a system property (see above) net.sf.ehcache.configurationResourceName = file:$\{dspace.dir}/config/hibernate-ehcache-config.xml which seems to be in conflict with the patch linked to this ticket.  Heaven only knows which configuration is used by various EHCache CacheManagers throughout DSpace - it depends on the order in which Spring resolves dependencies.
      • XMLUI embeds Cocoon which embeds yet another EHCache configuration, and it phones home too.  There may be no simple way to fix this, but I note it here.

      I suggest that we consolidate all of the EHCache configuration files that we can into a single file, eliminate Java code that sets up CacheManagers wherever we can, disable phone-home in that single configuration, and destroy all related code which sets system properties if said code could be called in a webapp.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mwood Mark H. Wood
              Reporter:
              mwood Mark H. Wood
              Reviewer:
              Kim Shepherd
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: