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)));