O'Reilly logo

Apache Karaf Cookbook by Heath Kesler, Johan Edstrom, Jamie Goodyear, Achim Nierbeck

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building a project with a persistence layer for deployment in Karaf

Application developers often need to make use of a persistence layer in their projects; one of the preferred methodologies to perform this in Karaf is to make use of the Java Persistence API and OpenJPA.

In the Installing OpenJPA modules in Apache Karaf recipe, we learned how to install OpenJPA in Karaf; in this recipe, we'll make use of the JPA and OpenJPA to build a simple application that persists recipes to a database using a RecipeBookService class, which will hide the complexities of data storage and retrieval from its users.

Getting ready

The ingredients of this recipe include the Apache Karaf distribution kit, access to JDK, and Internet connectivity. Sample code for this ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required