of many versions of a same class, a renaming strategy
was adopted.
Inside the CVMO meta-object, the class’s byte-
code is preserved and available for reflection. How-
ever, in the class’s bytecode, its name and all its su-
perclasses are renamed following a convention. In
our implementation, a class Person in version A is
renamed to Person$A. This class versioning has two
approaches: (1) as a simple object (an object of a
primitive type, such as an Integer or a String),
or (2) as a composite object (Person or Invoice).
Composite objects can be composed by simple ob-
jects and other composite objects. Thus, simple ob-
jects are treated in a non-versioned approach, while
the composite objects follow the renaming technique.
Using reflection, this renaming technique enables our
framework to know, at runtime, the class inheritance
relationships.
Regarding the classes’ version derivation path, we
consider that in many cases an algorithm, based on
the direct mapping of classes and attributes, can es-
tablish an implicit n-to-n connection among all ver-
sions of a class. In this direct mapping, the map-
ping of class version and its attributes is based in
their names and equivalence type, by applying default
conversion functions. Just when the necessary con-
ditions are not satisfied, is a user-defined connection
then required. In these cases, our meta-model enables
explicit connections through UBMO meta-objects.
These meta-objects contain all mapping information,
which follows an aspect-oriented approach. Each
UBMO meta-object stores a pointcut/advice expres-
sion that quantifies all points in the application code
that requires instance adaptation code.
2.3 Object Identity
At the meta-model, each IMO meta-object is a logi-
cal representation of an instance of an application data
entity. As an Object Identifier (OID) identifies an ob-
ject, a Logical Object Identifier (LOID) identifies an
IMO meta-object. Thus, a LOID identifies an appli-
cation data entity that is supported in the database by
one or more objects, each one with its own physical
OID. In turn, the OID physically identifies an object
or meta-object. This approach simplifies the object
update process because it avoids the physical replace-
ment of relationships and it also enables the existence
of several versions of the same object. On the other
hand, it enables the internal mapping and caching of
the application’s data objects, which provides means
to ensure that two references of the same object share
the same identity.
Concerning arrays, these are treated as a collec-
tion of individual object references as occurs in the
running environment, according to the same program-
ming language variance rules.
2.4 Schema Consistency
Applications with a specific schema version should be
able of use objects, which reside in the database, irre-
spectively of their class versions. These requirements
raise structural , semantical and behavioural consis-
tency issues that must be addressed.
Our approach, in order to deal with these issues,
benefits from the orthogonal persistence paradigm:
(1) closed integration of application and database en-
vironments, (2) sharing the same data model and (3)
incremental schema evolution. The static type check-
ing done by the compiler, at compile time, grants
that each object instance inside the application run-
time environment unconditionally pertains to, and fol-
lows, a specific application schema. The incremen-
tal schema evolution approach enables the propaga-
tion of all new class versions to the database, making
them persistent. Likewise, all objects are created un-
der only one valid schema, ensuring structural consis-
tency.
The semantic consistency is granted through up-
date/backdate conversion code and additional meta-
data added into the application schema. Our ap-
proach, based on UBMO meta-objects (see Sec-
tions 2.1 and 2.2) was inspired in the update/backdate
methods (Monk and Sommerville, 1993). The user-
defined conversion code, inside these meta-objects,
can adapt a class that suffered a semantic update. As
an example, consider a class Product where, in ver-
sion A, the product’s weight is defined as pounds and,
in version B, kilograms is used.
Behavioural consistency must be analysed in two
contexts: (1) the application’s run-time and (2) the
framework’s conversion-time. Considering that all
objects in the application environment pertain to its
schema, naturally, behavioural consistency is always
granted. However, at conversion-time this type of
consistency can raise complex issues since two ver-
sions of a class coexist in the framework’s environ-
ment. For non-versionable data types, the problem is
not relevant. On the other hand, for versionable data
types, version conflicts must be avoided. Let C(α)
and C(β) be, respectively, class C in versions α and β,
being α the current class version. If C has a property
P, then C(β) has P(γ), being γ the property’s class ver-
sion. Thus, an object of class C that is being converted
is renamed to C(β) to avoid name conflicts, as well as
all its return and argument values, of its methods, and
attributes to P(γ). Within this approach, we guaranty
ICEIS2014-16thInternationalConferenceonEnterpriseInformationSystems
310