session.getProject().setDefaultIsIsolated(!defaultShared);
}
Iterator it = session.getDescriptors().values().iterator();
while (it.hasNext() && (!typeMap.isEmpty() || !sizeMap.isEmpty() || !sharedMap.isEmpty())) {
ClassDescriptor descriptor = (ClassDescriptor)it.next();
if(descriptor.isAggregateDescriptor() || descriptor.isAggregateCollectionDescriptor()) {
continue;
}
String entityName = descriptor.getAlias();
String className = descriptor.getJavaClass().getName();
String name;
name = entityName;
String typeName = (String)typeMap.remove(name);
if(typeName == null) {
name = className;
typeName = (String)typeMap.remove(name);
}
if(typeName != null) {
Class type = findClassForProperty(typeName, PersistenceUnitProperties.CACHE_TYPE_ + name, loader);
descriptor.setIdentityMapClass(type);
}
name = entityName;
String sizeString = (String)sizeMap.remove(name);
if(sizeString == null) {
name = className;
sizeString = (String)sizeMap.remove(name);
}
if(sizeString != null) {
int size = Integer.parseInt(sizeString);
descriptor.setIdentityMapSize(size);
}
name = entityName;
String sharedString = (String)sharedMap.remove(name);
if(sharedString == null) {
name = className;
sharedString = (String)sharedMap.remove(name);
}
if(sharedString != null) {
boolean shared = Boolean.parseBoolean(sharedString);
descriptor.setIsIsolated(!shared);
}
}
}