Chapter 7. Providing a Persistence Layer with Apache Aries and OpenJPA

In this chapter, we will cover the following recipes:

  • Installing OpenJPA modules in Apache Karaf
  • Installing Apache Aries JTA modules in Apache Karaf
  • Building a project with a persistence layer for deployment in Karaf
  • Building a project with a persistence layer and transaction support for deployment in Karaf

Introduction

Your applications will commonly need to safely persist data and make use of transactional behaviors. A preferred way to accomplish this for Java developers is to use the Java Persistence API (JPA) and Java Transaction API (JTA). In the context of Apache Karaf, developers will use an OSGi-ready JPA implementation, such as Apache OpenJPA, EclipseLink, or Hibernate

Get Apache Karaf Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.