CacheException cacheException = null;
int nameCount = cacheNames.length;
try {
for (int i = 0; i < nameCount; i++) {
Cache cache = getCache(cacheNames[i]);
cache.removeAll();
}
} catch (CacheException exception) {
cacheException = exception;
} catch (Exception exception) {
cacheException = new CacheAccessException(exception);