*/
public void loadCache(Collection views)throws CacheException {
try{
Iterator iter = views.iterator();
Cache cache = factory.getCache();
while(iter.hasNext()){
CacheAccess access = null;
RepositoryView view = (RepositoryView)iter.next();
BeanDescriptor beanDesc = view.getBeanDescriptor();
String region = beanDesc.getDatabaseName();
String group = beanDesc.getRepositoryViewName();
try{
factory.defineRegion(region);
}
catch(ObjectExistsException e){
}
finally{
access = factory.getAccess(region);
}
access.defineGroup(group);
}
int size = cache.getAttributes().getMemoryCacheSize();
logger.log(Level.INFO,Messages.format("CacheManager.size",
new Integer(size)));
}
catch(Exception e){
throw new CacheException(e);