Programmatically serializing complex objects using self-healing techniques
First Claim
1. A computer-implemented method of programmatically serializing complex objects, comprising steps of:
- invoking, at run time, a serialization process on an object to be serialized;
encountering one or more errors that halt the run-time serialization process, due to missing type mappings that are needed to map from the object to a serialized form thereof;
programmatically resolving each encountered error, upon encountering each of the missing type mapping errors during the run-time serialization process, further comprising steps of;
programmatically analyzing an exception message resulting from each encountered error to locate therein a class name indicating a class of the object for which the type mapping is missing;
performing at least one of introspection and reflection on the class having the located class name to determine type information for fields of the class;
programmatically generating a type mapping for the class using the determined type information; and
using the programmatically generated type mapping for serializing the class of the object to the serialized form thereof; and
automatically restarting the serialization process after each encountered error is resolved.
1 Assignment
0 Petitions
Accused Products
Abstract
Methods, systems, and computer program products for programmatically serializing complex objects (such as JavaBeans™). In contrast to prior art techniques, a manually-specified data type mapping specification is not required as input to the serialization process. Instead, the present invention programmatically generates this type mapping, responsive to encountering run-time exceptions during the serialization process. The serialization process is therefore “self-healing”. This approach is especially advantageous when serializing complex objects that may include complex data types and/or embedded objects. The programmatically-generated type mapping information is preferably used to generate a serialized version of the complex object, and can also be used during deserialization. In addition to improving serialization techniques, this type mapping information facilitates dynamic integration and transformation of data between heterogeneous formats.
36 Citations
18 Claims
-
1. A computer-implemented method of programmatically serializing complex objects, comprising steps of:
-
invoking, at run time, a serialization process on an object to be serialized; encountering one or more errors that halt the run-time serialization process, due to missing type mappings that are needed to map from the object to a serialized form thereof; programmatically resolving each encountered error, upon encountering each of the missing type mapping errors during the run-time serialization process, further comprising steps of; programmatically analyzing an exception message resulting from each encountered error to locate therein a class name indicating a class of the object for which the type mapping is missing; performing at least one of introspection and reflection on the class having the located class name to determine type information for fields of the class; programmatically generating a type mapping for the class using the determined type information; and using the programmatically generated type mapping for serializing the class of the object to the serialized form thereof; and automatically restarting the serialization process after each encountered error is resolved. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A system for programmatically serializing complex objects, comprising:
-
means for invoking a run-time serialization process on an object to be serialized; means for programmatically resolving each of one or more errors that are encountered, at run time, during the run-time serialization process and that halt the run-time serialization process, due to missing type mappings that are needed to map from the object to a serialized form thereof by programmatically invoking; means for programmatically analyzing an exception message resulting from each encountered error to locate therein a class name indicating a class of the object for which the type mapping is missing; means for performing at least one of introspection and reflection on the class having the located class name to determine type information for fields of the class; means for programmatically generating a type mapping for the class using the determined type information; and means for using the programmatically generated type mapping for serializing the class of the object to the serialized form thereof; and means for automatically restarting the serialization process after each encountered error is resolved. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A computer program product for programmatically serializing complex objects, the computer program product embodied on one or more computer-readable media and comprising:
-
computer-readable program code for invoking a run-time serialization process on an object to be serialized; computer-readable program code for programmatically resolving each of one or more errors that are encountered, at run time, during the run-time serialization process and that halt the run-time serialization process, due to missing type mappings that are needed to map from the object to a serialized form thereof, by programmatically invoking; computer-readable program code for programmatically analyzing an exception message resulting from each encountered error to locate therein a class name indicating a class of the object for which the type mapping is missing; computer-readable program code for performing at least one of introspection and reflection on the class having the located class name to determine type information for fields of the class; computer-readable program code for programmatically generating a type mapping for the class using the determined type information; and computer-readable program code for using the programmatically generated type mapping for serializing the class of the object to the serialized form thereof; and computer-readable program code for automatically restarting the serialization process after each encountered error is resolved. - View Dependent Claims (14, 15, 16, 17, 18)
-
Specification