Debuging ehcache using the ehcache debugger

You will download a file from the ehcache web site and issue a command that monitors the network for cache events. This provides a much easier way to verify distributed caching is working, as compared to doing something like modifying workflow scripts and checking that the workflow engine picked up the modified script.

Procedure

  1. Download the ehcache debugger tar file from the ehcache web site, for example: http://ehcache.org/
  2. Unpack the archive and place the downloaded JAR file, for example ehcache-debugger-1.7.1.jar, into the $TOP/jars directory.
  3. Add the following line to the $TOP/bin/conf/classpath/jars-custom.txt file:
    jars/ehcache-debugger-1.7.1.jar
  4. Run the $ bin/configure_env.sh command. You can answer no to all of the questions to avoid disturbing your changes to the log4j2.xml file.
  5. Run the $ echo $JAVA_RT command and make sure that the ehcache-debugger-1.7.1.jar is in the command.
  6. Run the $ . bin/compat.sh command.
  7. Run the $ $JAVA_RT net.sf.ehcache.distribution.RemoteDebugger $TOP/etc/default/mdm-ehcache-config.xml command.