/**
* Allows BeanHandler to add Cache Configurations to the configuration.
*/
public final void addCache(CacheConfiguration cacheConfiguration) throws ObjectExistsException {
if (cacheConfigurations.get(cacheConfiguration.name) != null) {
throw new ObjectExistsException("Cannot create cache: " + cacheConfiguration.name + " with the same name as an existing one.");
}
if (cacheConfiguration.name.equalsIgnoreCase(net.sf.ehcache.Cache.DEFAULT_CACHE_NAME)) {
throw new ObjectExistsException("The Default Cache has already been configured");
}
cacheConfigurations.put(cacheConfiguration.name, cacheConfiguration);
}