About Class Loading
Since Ehcache is a library and supports user types both in configuration and in mapping keys or values, it must offer flexibility around class loading.
Default ClassLoader in Ehcache
The default ClassLoader from Ehcache will first try to use the thread context class loader, through Thread.currentThread().getContextClassLoader(). In case this fails to load the requested resource, it will then use the ClassLoader that loaded the Ehcache internal classes.