Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Data access layer

Data access layer

The data access layer is responsible for saving and retrieving data from persistent storage. The majority of persistent data in Elastic Path is stored in the database using the OpenJPA implementation of the Java Persistence API (JPA). A small number of configuration files are persisted directly to the file system using XML and properties files. Objects that are aware of persistence implementation details such as file formats or whether data exists in a database are called Data Access Objects (DAO).

Separation of persistence API and OpenJPA specific Implementation

The ep-persistence-api module contains the generic Elastic Path persistence interfaces, abstract superclasses and persistence-related utility classes. OpenJPA specific implementations of these can be found in the ep-persistence-openjpa module. This keeps the code using the persistence API decoupled from the actual implementation detail which allows for easier customizations and implementation enhancements in the future.

OpenJPA object/relational persistence

OpenJPA is a persistence service that maps objects to tables in a relational database. For more information, see the Java Persistence API (JPA) section.

Load tuners

Elastic Path uses Load tuners to optimize performance of OpenJPA.

Properties files

Some data is stored in properties files located in each web application's WEB-INF/conf/resources. This includes the lists of countries and country codes used to populate drop-downs in the store. These properties are read into the system by PropertiesDaoImpl.