You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

In grouper 2.3.0 (unpatched) and previous versions, ehcache was configured with an ehcache.xml (actually in old versions of grouper there were a couple ehcache xml config files).

Configuration

Sample ehcache.xml config

  <cache  name="edu.internet2.middleware.grouper.internal.dao.hib3.Hib3MemberDAO.FindBySubject"
          maxElementsInMemory="5000"
          eternal="false"
          timeToIdleSeconds="5"
          timeToLiveSeconds="10"
          overflowToDisk="false"  
          statistics="false"
  />

This needs to be converted to config overlays so Grouper packaging can have defaults and overlays.  Also so the Grouper team can add caches and be able to patch the defaults without having to merge with a potentially changed file.

Sample grouper.cache.base.properties config:

cache.name.internal_dao_hib3_Hib3GroupDAO.name = edu.internet2.middleware.grouper.internal.dao.hib3.Hib3GroupDAO
cache.name.internal_dao_hib3_Hib3GroupDAO.maxElementsInMemory = 500
cache.name.internal_dao_hib3_Hib3GroupDAO.eternal = false
cache.name.internal_dao_hib3_Hib3GroupDAO.timeToIdleSeconds = 1
cache.name.internal_dao_hib3_Hib3GroupDAO.timeToLiveSeconds = 1
cache.name.internal_dao_hib3_Hib3GroupDAO.overflowToDisk = false

Note, the part that links the properties entries together is the part between "name" and the following dot.  In this case "internal_dao_hib3_Hib3GroupDAO".  This was automatically converted from the ehcache.xml file by looking at the cache name and chopping off the prefix "edu.internet2.middleware.grouper", though thats not important, it could be "abc" and it would work.  However, we should follow this convention going forward.

Upgrade via Patch

  • If you have previously edited the ehcache.xml file
    • Get the latest grouperInstaller.jar
    • Backup your ehcache.xml and ehcache.example.xml file
    • Install the 2.3.0#35 API patch (note: Force install that patch since it will say file mismatch)
    • Copy your ehcache.xml and ehcache.example.xml files back to the classpath
    • Delete the empty grouper.cache.properties file
    • Run the grouperInstaller, admin task, upgradeTasks, convert ehcache xml to properties
    • Follow the prompt to identify the location of the ehcache.xml file
    • This will generate the grouper.cache.properties file based on your ehcache.xml edits
    • Examine the grouper.cache.properties file.  Diff your ehcache.xml file with your ehcache.example.xml file and make sure those diffs are expected and listed in your grouper.cache.properties file
    • Delete the ehcache.xml and ehcache.example.xml files 
    • Force install the patch in your other envs (UI, WS, daemon, etc), and copy the grouper.cache.properties to each env (no need to go through this same process unless you have different cache customizations in each env)
  • If you havent edited the ehcache.xml file
    • If you have the latest 2.3.0 grouperInstaller as of 11/26/2016
      • Install patch 2.3.0#35
      • You will be converted and upgraded
    • If you dont have the latest 2.3.0 grouperInstaller as of 11/26/2016
      • Get the latest installer, but if you dont
      • Install patch 2.3.0#35
      • Delete the ehcache.xml and ehcache.example.xml files
      • Until you delete those files you will get a non fatal error on startup reminding you to delete those files

Upgrade via upgrade

If you upgrade to 2.3.1+ it will walk you through the process of automatically converting your ehcache.xml to grouper.cache.properties

 

sdf

  • No labels