Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "CDO/Hibernate Store/Architecture"

(Runtime)
Line 9: Line 9:
 
The image below illustrates the relation between the components. It shows that the data store implementation of transparent to the client. The Hibernate data store supports the same api as other CDO stores. The Hibernate store has has an additional feature that it supports [[CDO_Hibernate_Store_HQL|HQL]] as the query language on the client.
 
The image below illustrates the relation between the components. It shows that the data store implementation of transparent to the client. The Hibernate data store supports the same api as other CDO stores. The Hibernate store has has an additional feature that it supports [[CDO_Hibernate_Store_HQL|HQL]] as the query language on the client.
  
== Runtime ==
 
  
At runtime the CDO Hibernate Store steps through several phases:
+
At runtime the components (CDO, Teneo, Hibernate) operate together to provide a complete solution:
* at startup the package store is created to store ecore packages in the database
+
* at startup the package store is created to store ecore packages in the database. The package store uses Hibernate to store ecore packages in a fixed database schema.
 
* when the client registers a new ecore package and commits then the following actions take place:
 
* when the client registers a new ecore package and commits then the following actions take place:
** the new ecore package is stored in the database
+
** the new ecore package is stored in the database (using the package store)
 
** a new mapping is generated (using Teneo) for the new ecore package and all the already existing packages
 
** a new mapping is generated (using Teneo) for the new ecore package and all the already existing packages
** the hibernate store is re-initialized with the new mapping
+
** the hibernate store (which stores the actual data) is re-initialized with the new mapping
 
** depending on specific Hibernate properties the database schema is updated
 
** depending on specific Hibernate properties the database schema is updated
 
* when the user commits actual CDO objects then hibernate is called to update/insert/delete the objects from the database
 
* when the user commits actual CDO objects then hibernate is called to update/insert/delete the objects from the database

Revision as of 18:40, 20 January 2010


The CDO Hibernate Store makes use of 2 distinctive components:

  • Hibernate: for runtime object relational mapping from CDO objects to a relational database, support for HQL queries from the client.
  • Teneo: responsible for generating a hibernate mapping from one or more ecore models possibly annotated with JPA annotations to influence the mapping.

The Teneo component is focused on generating the mapping to Hibernate. The actual runtime implementation consists of an implementation of a CDO data store (supporting the CDO api for data stores) and Hibernate itself.

The image below illustrates the relation between the components. It shows that the data store implementation of transparent to the client. The Hibernate data store supports the same api as other CDO stores. The Hibernate store has has an additional feature that it supports HQL as the query language on the client.


At runtime the components (CDO, Teneo, Hibernate) operate together to provide a complete solution:

  • at startup the package store is created to store ecore packages in the database. The package store uses Hibernate to store ecore packages in a fixed database schema.
  • when the client registers a new ecore package and commits then the following actions take place:
    • the new ecore package is stored in the database (using the package store)
    • a new mapping is generated (using Teneo) for the new ecore package and all the already existing packages
    • the hibernate store (which stores the actual data) is re-initialized with the new mapping
    • depending on specific Hibernate properties the database schema is updated
  • when the user commits actual CDO objects then hibernate is called to update/insert/delete the objects from the database
  • the user can fire HQL queries directly from the client to server. The Hibernate QueryHandler takes care of executing the queries and returning the results.



Wikis: CDO | Net4j | EMF | Eclipse

Back to the top