*
* @since 3.0
*/
public ClassDescriptorMap getClassDescriptorMap() {
if (classDescriptorMap == null) {
ClassDescriptorMap classDescriptorMap = new ClassDescriptorMap(this);
FaultFactory faultFactory = new SingletonFaultFactory();
// add factories in reverse of the desired chain order
classDescriptorMap.addFactory(new ValueHolderDescriptorFactory(
classDescriptorMap));
classDescriptorMap.addFactory(new EnhancedPojoDescriptorFactory(
classDescriptorMap,
faultFactory));
classDescriptorMap.addFactory(new DataObjectDescriptorFactory(
classDescriptorMap,
faultFactory));
// since ClassDescriptorMap is not synchronized, we need to prefill it with
// entity proxies here.
Iterator maps = this.maps.iterator();
while (maps.hasNext()) {
DataMap map = (DataMap) maps.next();
Iterator entities = map.getObjEntityMap().keySet().iterator();
while (entities.hasNext()) {
classDescriptorMap.getDescriptor((String) entities.next());
}
}
this.classDescriptorMap = classDescriptorMap;
}