Introduction
The Service Data Objects (SDO) standard provides a uniform way in which applications can handle data regardless of the source or format.
SDO has a disconnected data access model, including the ability to collect client changes over a potentially long running and distributed business transaction before submitting the data to some business logic layer for processing of any changes and persistence to a datastore.
SDOs are accessed from and updated to data sources through Data Access Services (DAS). Data sources can include relational databases.
The Java Persistence API (JPA) is the standard object/relational mapping technology for the Java Platform. Therefore, JPA is a natural technology to leverage as a Data Access Service (DAS) when using SDO in a Java environment.
SDO on top of JPA
JPA provides an object oriented view on persistence for Java applications. In many application use cases it is sufficient to use JPA directly over a local domain model in order to manage persistence for domain objects.
Although JPA has made domain object persistence much simpler than previously available persistence technologies in the Java EE standard, certain scenarios suggest or even require the use of so-called data-transfer objects (DTO) on top of JPA.
De-coupling of business logic implementation from its clients by a service layer is a prominent example and a common pattern in service oriented architecture. In this case, clients of the implementation are not known ahead of time and can reside well outside the boundaries of a JPA persistence context. Moreover service interfaces frequently adhere to a document-style data representation which is a more natural scenario for the use of SDO than for the use of JPA objects.
The SDO standard defines an easy-to-provide and easy-to-consume implementation of the DTO pattern with additional features that help implementing data contracts.
An integration of SDO with JPA would mainly aim to simplify the provision of SDOs from queries and describe processing of the SDO change summary.
Work on the specification of a JPA data access service by the OSOA collaboration is envisaged sometime in the future but has not started yet.