Skip to content
Alexey Valikov edited this page Aug 31, 2017 · 1 revision

Java Persistence

In computer science persistence is a characteristic of data that outlives the execution of the program that created it.

In the context of Java, persitence is the capability to store (retrieve, query) Java objects (or object graphs) in the long term.

There is a huge number of technologies, libraries and solutions which address the problem of persistence in Java. There's XML persistence, object databases, object-relational mapping and many other approaches to the issue.

Hyperjaxb3 provides an XML-object-relational persistence solution which is essentially a combination of two parts:

  • XML-object part based on XML data binding;
  • object-relational part based on object-relational mapping.

XML data binding

XML data binding refers to the process of representing the information in an XML document as an object in computer memory. This allows applications to access the data in the XML from the object rather than using the DOM or SAX to retrieve the data from a direct representation of the XML itself.

Hyperjaxb3 uses Java Architecture for XML Binding as XML data binding technology. JAXB is our primary and core component, an integral part of Hyperjaxb3.

Object-relational mapping

Hyperjaxb3 allows instances of schema-derived classes (I often call the JAXB objects) to be persisted in a relational database using the object-relational mapping technology. The primary task of Hyperjaxb3 is to generate the OR mapping definitions for the target object-relational mapper.

The idea behind Hyperjaxb3 is not bound to any concrete ORM mapper. Theoretically it can be applied to almoust any ORM technology. At the same time on implementation level we want to ensure high portability and acceptance. Therefore we adopted Java Persistence API as our primary ORM technology. Hence, current implementation of Hyperjaxb3 generates ORM metadata for JPA in form of annotations or XML resources. These mappings are portable across different JPA providers meaning you can use Hyperjaxb3 with Hibernate or Oracle TopLink or EclipseLink or any other JPA-compliant provider.

Nevertheless as a future development we consider adding native support for popular OR-mappers like Hibernate. This would allow generating vendor-specific mappings or annotations - which may solve certain OR-mapping tasks better than standard JPA means.

Related topics

Clone this wiki locally