private boolean isCustomCacheLoaderConfigured(CacheLoader cl)
{
if (cl instanceof ChainingCacheLoader)
{
// test all loaders in the chain.
ChainingCacheLoader ccl = (ChainingCacheLoader) cl;
Iterator it = ccl.getCacheLoaders().iterator();
boolean isCustom = false;
while (it.hasNext())
{
CacheLoader nextCacheLoader = (CacheLoader) it.next();
isCustom = isCustom || isCustomCacheLoaderConfigured(nextCacheLoader);