{
loader = createCacheLoader();
}
catch (Exception e)
{
throw new CacheException("Unable to create cache loaders", e);
}
}
if (loader != null)
{
try
{
// wire any deps.
registry.wireDependencies(loader);
// create the cache loader
loader.create();
// start the cache loader
loader.start();
purgeLoaders(false);
}
catch (Exception e)
{
throw new CacheException("Unable to start cache loaders", e);
}
fetchPersistentState = fetchPersistentState || (loader.getConfig() != null && loader.getConfig().isFetchPersistentState());
fetchPersistentState = fetchPersistentState || (config != null && config.isFetchPersistentState());
}
}