Mechanism to load first version classes into a runtime environment running a second version of the class
First Claim
Patent Images
1. A method for loading a first version of a class into a second version of a runtime environment running a second version of the class, the method comprising the computer implemented steps of:
- instantiating an object in a first version of a runtime environment wherein the object is an instance of a first version of a class loaded in a first version of a class loader;
serializing the object to create a serialized object and storing the serialized object on a storage medium;
allowing the first version of the class to be modified to create a second version of the class, wherein the second version of the class has a different definition from the first version of the class;
loading a second version of the class in a second version of a class loader for a second version of the runtime environment;
receiving the serialized object in the second version of the runtime environment, wherein the first version of the class is incompatible with the second version of the class loader for the second version of the runtime environment;
constructing a class file with a class file name for the class that represents the serialized object and a serial version identifier for the first version of the class;
loading, into the second version of the runtime environment, the serialized object using the class file as constructed in an auxiliary class loader compatible with the first version of the class; and
converting information from the serialized object into an intermediate storage format for use with the second version of the runtime environment.
2 Assignments
0 Petitions
Accused Products
Abstract
Mechanisms and methods for loading a first version of a class into a second version runtime environment running a second version of the class. The runtime environment may be comprised of a Java Virtual Machine (JYM). These mechanisms and methods make it possible for applications to retrieve and convert legacy data into current versions of the runtime environment. The conversion of data may be done automatically and/or transparently to a user or calling process.
-
Citations
29 Claims
-
1. A method for loading a first version of a class into a second version of a runtime environment running a second version of the class, the method comprising the computer implemented steps of:
-
instantiating an object in a first version of a runtime environment wherein the object is an instance of a first version of a class loaded in a first version of a class loader; serializing the object to create a serialized object and storing the serialized object on a storage medium; allowing the first version of the class to be modified to create a second version of the class, wherein the second version of the class has a different definition from the first version of the class; loading a second version of the class in a second version of a class loader for a second version of the runtime environment; receiving the serialized object in the second version of the runtime environment, wherein the first version of the class is incompatible with the second version of the class loader for the second version of the runtime environment; constructing a class file with a class file name for the class that represents the serialized object and a serial version identifier for the first version of the class; loading, into the second version of the runtime environment, the serialized object using the class file as constructed in an auxiliary class loader compatible with the first version of the class; and converting information from the serialized object into an intermediate storage format for use with the second version of the runtime environment. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 25)
-
-
12. The method of claim l, wherein selecting an intermediate storage format for the information for use with the second version runtime environment comprises:
-
selecting a hashmap as intermediate storage format for the information if the first version class comprises name/value pairings; selecting an eXtended Markup Language (XML) object as intermediate storage format for the information if the first version class comprises metadata; and selecting a string object as intermediate storage format for the information if the first version class comprises a long string data.
-
-
13. A computer-readable storage medium storing one or more sequences of instructions for loading a first version of a class into a second version of a runtime environment running a second version of the class, which instructions, when executed by one or more processors, cause the one or more processors to carry out the steps of:
-
instantiating an object in a first version of a runtime environment wherein the object is an instance of a first version of a class loaded in a first version of a class loader; serializing the object to create a serialized object and storing the serialized object on a storage medium; allowing the first version of the class to be modified to create a second version of the class, wherein the second version of the class has a different definition from the first version of the class; loading a second version of the class in a second version of a class loader for a second version of the runtime environment; receiving the serialized object in the second version of the runtime environment, wherein the first version of the class is incompatible with the second version of the class loader for the second version of the runtime environment; constructing a class file with a class file name for the class that represents the serialized object and a serial version identifier for the first version of the class; loading, into the second version of the runtime environment, the serialized object using the class file as constructed in an auxiliary class loader compatible with the first version of the class; and converting information from the serialized object into an intermediate storage format for use with the second version of the runtime environment. - View Dependent Claims (14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24)
-
-
26. A system to load data from a serialized object of a first version of a class in a run time environment including a second version of the class, comprising:
-
a processor; a serialized object stored on a storage medium, wherein the serialized object is an instance of first version of a class, wherein the first version of the class does not have a serial version identifier; a run time environment that includes; one or more virtual machines; an instance of a second version of the class; a primary class loader for loading the second version of a class; an auxiliary class loader for loading the first version of the class; computer code for constructing a class file for the first version of the class which includes a file name, serial version identifier, and data members; computer code for loading the class file as constructed in the auxiliary class loader, and computer code for extracting information from the serialized object into an intermediate storage format, for use with the instance of the second version of the class. - View Dependent Claims (27, 28, 29)
-
Specification