Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Learning Karaf Cellar
  • Table Of Contents Toc
Learning Karaf Cellar

Learning Karaf Cellar

By : Jean Baptiste Onofre, Jean-Baptiste Onofré
5 (1)
close
close
Learning Karaf Cellar

Learning Karaf Cellar

5 (1)
By: Jean Baptiste Onofre, Jean-Baptiste Onofré

Overview of this book

This book is a tutorial written with a step-by-step approach to help you implement an optimum clustering solution in Apache Karaf Cellar quickly and efficiently. If you are new to Karaf and want to install and manage multiple Karaf instances by farming or clustering, then this book is for you. If you are a Java developer or a system administrator with basic knowledge of Karaf, you can use this book as a guide. Some background knowledge of OSGi and/or Karaf would be preferred but is not mandatory.
Table of Contents (11 chapters)
close
close

The API bundle


In OSGi, a service is described with an interface. This means that both service and client bundles of the same service have to share the same interface.

In order to decouple interface and implementation and be able to update a client bundle without impacting a service bundle, a good practice is to create an API bundle that contains just the interface.

We create this API bundle by just exposing the API package in the OSGi export package header as follows:

<osgi.export>
 org.apache.karaf.cellar.samples.dosgi.greeter.api*;version="${project.version}"
</osgi.export>

The API bundle contains the interface that describes the Greeter service as follows:

package org.apache.karaf.cellar.samples.dosgi.greeter.api;

/**
 * Interface describing the Greeter service.
 */
public interface Greeter {

  /**
   * Returns a greet message.
   * @return
   */
  public GreetResponse greet(Greet greet);

}

The service provides an operation: greet corresponding to the greet() method of the Greeter...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Learning Karaf Cellar
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon