You are previewing Apache Karaf Cookbook.
O'Reilly logo
Apache Karaf Cookbook

Book Description

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

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.

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
  • Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

    Table of Contents

    1. Apache Karaf Cookbook
      1. Table of Contents
      2. Apache Karaf Cookbook
      3. Credits
      4. About the Authors
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers, and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      8. 1. Apache Karaf for System Builders
        1. Introduction
        2. Configuring production-ready logging in Apache Karaf
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        3. Creating our own custom Karaf command using a Maven archetype
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Branding the Apache Karaf console
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        5. Deploying applications as a feature
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        6. Using JMX to monitor and administer Apache Karaf
          1. Getting ready
          2. How to do it…
        7. Reconfiguring SSH access to Apache Karaf
          1. Getting ready
          2. How to do it…
          3. There's more…
        8. Installing Apache Karaf as a service
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        9. Setting up Apache Karaf for high availability
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
      9. 2. Making Smart Routers with Apache Camel
        1. Introduction
        2. Installing Apache Camel modules into Apache Karaf
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        3. Listing Camel Contexts in Karaf
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Displaying Camel Context information in Karaf
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        5. Starting and stopping Camel Contexts in Karaf
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        6. Listing routes in Karaf
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        7. Displaying route information in Karaf
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        8. Starting, stopping, suspending, and resuming routes in Karaf
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        9. Listing endpoints in Karaf
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        10. Making a pure Java-based Camel Router for deployment in Karaf
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        11. Creating a Blueprint-based Camel Router for deployment in Karaf
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        12. Adding Configuration Admin to a Blueprint-based Camel Router
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        13. Creating a managed service factory implementation of a Camel Router
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
      10. 3. Deploying a Message Broker with Apache ActiveMQ
        1. Introduction
        2. Installing Apache ActiveMQ modules into Apache Karaf
          1. How to do it…
          2. How it works…
        3. Using the ActiveMQ query command
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        4. Using the ActiveMQ list command
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        5. Using the ActiveMQ dstat command
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        6. Using the ActiveMQ purge command
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        7. Using the JMS connection factory commands
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        8. Using the JMS send command
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        9. Using the JMS browse command
          1. Getting ready
          2. How to do it…
          3. How it works…
        10. Configuring and deploying a master/slave broker with Apache Karaf
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        11. Configuring and deploying a Network of Brokers with Apache Karaf
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
      11. 4. Hosting a Web Server with Pax Web
        1. Introduction
        2. Installing Pax modules in Apache Karaf
          1. How to do it…
          2. How it works…
          3. See also
        3. Installing extended Http Service in Apache Karaf
          1. How to do it…
          2. How it works…
          3. See also
        4. Configuring Pax Web modules deployed in Apache Karaf
          1. How to do it…
          2. How it works…
          3. There's more…
          4. How it works…
        5. Building a Http Service project to host in Apache Karaf
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        6. Building a Http Service with the Whiteboard pattern in Apache Karaf
          1. How to do it…
            1. Registering error pages
            2. Defining error page mapping
            3. Registering a welcome page
            4. Register JSPs
          2. How it works...
        7. Building an application with custom HttpContext with Apache Karaf
          1. Getting ready
          2. How to do it…
          3. There's more…
        8. Building a standard web project to host in Apache Karaf
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        9. Configuring security for a web application in Apache Karaf
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        10. Binding a web project to a specific host in Apache Karaf
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        11. Building a Servlet 3.0 annotated web application with Apache Karaf
          1. Getting ready
          2. How to do it…
          3. There's more…
          4. How it works…
        12. Creating a CDI web application with Apache Karaf
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
      12. 5. Hosting Web Services with Apache CXF
        1. Introduction
        2. Installing Apache CXF modules in Apache Karaf
          1. How to do it…
          2. How it works…
          3. See also
        3. Using the CXF list-endpoints command
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        4. Using the CXF stop and start commands
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        5. Building and deploying a RESTful service in Karaf
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        6. Building and deploying a Camel CXF web service in Karaf
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
      13. 6. Distributing a Clustered Container with Apache Karaf Cellar
        1. Introduction
        2. Installing Apache Karaf Cellar modules in Apache Karaf
          1. How to do it…
          2. How it works…
        3. Using Apache Karaf Cellar commands
          1. Getting ready
          2. How to do it…
            1. Group commands
            2. The node commands
            3. Cluster configuration commands
          3. How it works…
          4. See also
        4. Building and deploying a distributed architecture with Cellar
          1. Getting ready
          2. How to do it…
            1. Producing a service bundle
            2. Service consuming bundle
          3. How it works…
      14. 7. Providing a Persistence Layer with Apache Aries and OpenJPA
        1. Introduction
        2. Installing OpenJPA modules in Apache Karaf
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        3. Installing Apache Aries JTA modules in Apache Karaf
          1. Getting ready
          2. How to do it…
            1. Installing the JTA feature into Karaf
          3. How it works…
          4. See also
        4. Building a project with a persistence layer for deployment in Karaf
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        5. Building a project with a persistence layer and transaction support for deployment in Karaf
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
      15. 8. Providing a Big Data Integration Layer with Apache Cassandra
        1. Introduction
        2. Installing Cassandra client bundles in Apache Karaf
          1. Getting ready
          2. How to do it…
        3. Modeling data with Apache Cassandra
          1. Getting ready
          2. How to do it…
          3. How it works…
        4. Building a project with a persistence layer for deployment in Karaf
          1. Getting ready
          2. How to do it…
          3. How it works…
      16. 9. Providing a Big Data Integration Layer with Apache Hadoop
        1. Introduction
        2. Starting a standalone Hadoop cluster
        3. Installing Hadoop client bundles in Apache Karaf
          1. Getting ready
          2. How to do it…
        4. Accessing Apache Hadoop from Karaf
          1. How to do it…
          2. How it works
        5. Adding commands that talk to HDFS for deployment in Karaf
          1. Getting ready
          2. How to do it...
          3. How it works…
      17. 10. Testing Apache Karaf with Pax Exam
        1. Introduction
        2. Setting up a Pax Exam test environment
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        3. Testing Apache Karaf features
          1. Getting ready
          2. How to do it…
          3. How it works…
        4. Testing commands with Apache Karaf
          1. Getting ready
          2. How to do it...
          3. How it works…
        5. Coverage with Apache Karaf Pax Exam tests
          1. Getting ready
          2. How to do it…
          3. How it works…
        6. Testing Apache Camel with Blueprint and Apache Karaf
          1. Getting ready
          2. How to do it…
          3. How it works…
      18. Index