Book Image

Apache Karaf Cookbook

By : Jamie Goodyear, Johan Edstorm, Achim Nierbeck, Heath J Kesler
Book Image

Apache Karaf Cookbook

By: Jamie Goodyear, Johan Edstorm, Achim Nierbeck, Heath J Kesler

Overview of this book

Table of Contents (17 chapters)
Apache Karaf Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

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. As we are building on the existing JPA project, we will try and set up a new service layer and reuse (copy) the same project model while moving over the storage backend to Apache Cassandra. This is not a complete refactoring nor a reuse of code. Technically, we could have moved the API parts from Chapter 7, Providing a Persistence Layer with Apache Aries and OpenJPA, into a new module and then refactored the chapter to have the Cassandra-related dependencies and a slightly different set of imports. This isn't really in the scope of a Cookbook, hence the copied structure.

In the Installing Cassandra client bundles in Apache Karaf recipe, we learned how to install the necessary JAR files into Karaf. Continuing with this recipe, we'll make...