Apache Karaf Cookbook

Over 60 recipes to help you get the most out of your Apache Karaf deployments

Apache Karaf Cookbook

Cookbook
Achim Nierbeck et al.

Over 60 recipes to help you get the most out of your Apache Karaf deployments
$21.99
$35.99
RRP $21.99
RRP $35.99
eBook
Print + eBook
$12.99 p/month

Get Access

Get Unlimited Access to every Packt eBook and Video course

Enjoy full and instant access to over 3000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

+ Collection
Free Sample

Book Details

ISBN 139781783985081
Paperback260 pages

About This Book

  • Leverage Apache Karaf to apply OSGi's powerful features to frameworks such as Apache ActiveMQ, Camel, Cassandra, CXF, and Hadoop
  • Set up Apache Karaf for high availability
  • A thorough guide with example-based recipes to help you get a deeper understanding of Apache Karaf’s capabilities

Who This Book Is For

This book is intended for developers who have some familiarity with Apache Karaf and who want a quick reference for practical, proven tips on how to perform common tasks such as configuring Pax modules deployed in Apache Karaf, Extending HttpService with Apache Karaf.

You should have working knowledge of Apache karaf, as the book provides a deeper understanding of the capabilities of Apache Karaf.

Table of Contents

Chapter 1: Apache Karaf for System Builders
Introduction
Configuring production-ready logging in Apache Karaf
Creating our own custom Karaf command using a Maven archetype
Branding the Apache Karaf console
Deploying applications as a feature
Using JMX to monitor and administer Apache Karaf
Reconfiguring SSH access to Apache Karaf
Installing Apache Karaf as a service
Setting up Apache Karaf for high availability
Chapter 2: Making Smart Routers with Apache Camel
Introduction
Installing Apache Camel modules into Apache Karaf
Listing Camel Contexts in Karaf
Displaying Camel Context information in Karaf
Starting and stopping Camel Contexts in Karaf
Listing routes in Karaf
Displaying route information in Karaf
Starting, stopping, suspending, and resuming routes in Karaf
Listing endpoints in Karaf
Making a pure Java-based Camel Router for deployment in Karaf
Creating a Blueprint-based Camel Router for deployment in Karaf
Adding Configuration Admin to a Blueprint-based Camel Router
Creating a managed service factory implementation of a Camel Router
Chapter 3: Deploying a Message Broker with Apache ActiveMQ
Introduction
Installing Apache ActiveMQ modules into Apache Karaf
Using the ActiveMQ query command
Using the ActiveMQ list command
Using the ActiveMQ dstat command
Using the ActiveMQ purge command
Using the JMS connection factory commands
Using the JMS send command
Using the JMS browse command
Configuring and deploying a master/slave broker with Apache Karaf
Configuring and deploying a Network of Brokers with Apache Karaf
Chapter 4: Hosting a Web Server with Pax Web
Introduction
Installing Pax modules in Apache Karaf
Installing extended Http Service in Apache Karaf
Configuring Pax Web modules deployed in Apache Karaf
Building a Http Service project to host in Apache Karaf
Building a Http Service with the Whiteboard pattern in Apache Karaf
Building an application with custom HttpContext with Apache Karaf
Building a standard web project to host in Apache Karaf
Configuring security for a web application in Apache Karaf
Binding a web project to a specific host in Apache Karaf
Building a Servlet 3.0 annotated web application with Apache Karaf
Creating a CDI web application with Apache Karaf
Chapter 5: Hosting Web Services with Apache CXF
Introduction
Installing Apache CXF modules in Apache Karaf
Using the CXF list-endpoints command
Using the CXF stop and start commands
Building and deploying a RESTful service in Karaf
Building and deploying a Camel CXF web service in Karaf
Chapter 6: Distributing a Clustered Container with Apache Karaf Cellar
Introduction
Installing Apache Karaf Cellar modules in Apache Karaf
Using Apache Karaf Cellar commands
Building and deploying a distributed architecture with Cellar
Chapter 7: Providing a Persistence Layer with Apache Aries and OpenJPA
Introduction
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
Chapter 8: Providing a Big Data Integration Layer with Apache Cassandra
Introduction
Installing Cassandra client bundles in Apache Karaf
Modeling data with Apache Cassandra
Building a project with a persistence layer for deployment in Karaf
Chapter 9: Providing a Big Data Integration Layer with Apache Hadoop
Introduction
Starting a standalone Hadoop cluster
Installing Hadoop client bundles in Apache Karaf
Accessing Apache Hadoop from Karaf
Adding commands that talk to HDFS for deployment in Karaf
Chapter 10: Testing Apache Karaf with Pax Exam
Introduction
Setting up a Pax Exam test environment
Testing Apache Karaf features
Testing commands with Apache Karaf
Coverage with Apache Karaf Pax Exam tests
Testing Apache Camel with Blueprint and Apache Karaf

What You Will Learn

  • Turn Karaf into a Smart Router with Apache Camel
  • Model Karaf into a Message Broker with Apache ActiveMQ
  • Transform Karaf into a JSP host with Pax Web
  • Distribute your Karaf applications across a clustered container with Apache Karaf Cellar
  • Transmute Karaf into a web service container with Apache CXF
  • Set up a Pax Exam test environment
  • Turbo-charge your Karaf applications' persistence layer scalability with Apache Cassandra
  • Manage Big Data on Karaf with Apache Hadoop

In Detail

Apache Karaf is more than just an OSGi-based runtime container; it's an ecosystem of open source technologies that makes operating and managing applications easier.

This book starts by covering how to make your deployment more production ready, and then covers many of the most popular Service Oriented Architecture projects that you can integrate into Karaf – these are some of the most sought after developer skills in modern enterprises. The book also delves into transforming Karaf into a JSP host, distributing containers using Apache Karaf Cellar, and providing persistence to your applications. Finally, you'll explore the world of Big Data with Apache Cassandra and Hadoop, setting the stage for your Karaf deployment to handle today's large datasets.

Authors

Table of Contents

Chapter 1: Apache Karaf for System Builders
Introduction
Configuring production-ready logging in Apache Karaf
Creating our own custom Karaf command using a Maven archetype
Branding the Apache Karaf console
Deploying applications as a feature
Using JMX to monitor and administer Apache Karaf
Reconfiguring SSH access to Apache Karaf
Installing Apache Karaf as a service
Setting up Apache Karaf for high availability
Chapter 2: Making Smart Routers with Apache Camel
Introduction
Installing Apache Camel modules into Apache Karaf
Listing Camel Contexts in Karaf
Displaying Camel Context information in Karaf
Starting and stopping Camel Contexts in Karaf
Listing routes in Karaf
Displaying route information in Karaf
Starting, stopping, suspending, and resuming routes in Karaf
Listing endpoints in Karaf
Making a pure Java-based Camel Router for deployment in Karaf
Creating a Blueprint-based Camel Router for deployment in Karaf
Adding Configuration Admin to a Blueprint-based Camel Router
Creating a managed service factory implementation of a Camel Router
Chapter 3: Deploying a Message Broker with Apache ActiveMQ
Introduction
Installing Apache ActiveMQ modules into Apache Karaf
Using the ActiveMQ query command
Using the ActiveMQ list command
Using the ActiveMQ dstat command
Using the ActiveMQ purge command
Using the JMS connection factory commands
Using the JMS send command
Using the JMS browse command
Configuring and deploying a master/slave broker with Apache Karaf
Configuring and deploying a Network of Brokers with Apache Karaf
Chapter 4: Hosting a Web Server with Pax Web
Introduction
Installing Pax modules in Apache Karaf
Installing extended Http Service in Apache Karaf
Configuring Pax Web modules deployed in Apache Karaf
Building a Http Service project to host in Apache Karaf
Building a Http Service with the Whiteboard pattern in Apache Karaf
Building an application with custom HttpContext with Apache Karaf
Building a standard web project to host in Apache Karaf
Configuring security for a web application in Apache Karaf
Binding a web project to a specific host in Apache Karaf
Building a Servlet 3.0 annotated web application with Apache Karaf
Creating a CDI web application with Apache Karaf
Chapter 5: Hosting Web Services with Apache CXF
Introduction
Installing Apache CXF modules in Apache Karaf
Using the CXF list-endpoints command
Using the CXF stop and start commands
Building and deploying a RESTful service in Karaf
Building and deploying a Camel CXF web service in Karaf
Chapter 6: Distributing a Clustered Container with Apache Karaf Cellar
Introduction
Installing Apache Karaf Cellar modules in Apache Karaf
Using Apache Karaf Cellar commands
Building and deploying a distributed architecture with Cellar
Chapter 7: Providing a Persistence Layer with Apache Aries and OpenJPA
Introduction
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
Chapter 8: Providing a Big Data Integration Layer with Apache Cassandra
Introduction
Installing Cassandra client bundles in Apache Karaf
Modeling data with Apache Cassandra
Building a project with a persistence layer for deployment in Karaf
Chapter 9: Providing a Big Data Integration Layer with Apache Hadoop
Introduction
Starting a standalone Hadoop cluster
Installing Hadoop client bundles in Apache Karaf
Accessing Apache Hadoop from Karaf
Adding commands that talk to HDFS for deployment in Karaf
Chapter 10: Testing Apache Karaf with Pax Exam
Introduction
Setting up a Pax Exam test environment
Testing Apache Karaf features
Testing commands with Apache Karaf
Coverage with Apache Karaf Pax Exam tests
Testing Apache Camel with Blueprint and Apache Karaf

Book Details

ISBN 139781783985081
Paperback260 pages
Read More