// one must register the TypeDesc before to deserialize the JavaServiceDesc
// as it contains a bunch of BeanXXXFactory instances which need
// them registered to properly recreate the state of the factories.
for (Iterator iter = typeInfo.iterator(); iter.hasNext();) {
TypeInfo info = (TypeInfo) iter.next();
TypeDesc.registerTypeDescForClass(info.getClazz(), info.buildTypeDesc());
}
serviceDesc = (JavaServiceDesc) in.readObject();
}