이 콘텐츠는 선택한 언어로 제공되지 않습니다.

4.6. Running Red Hat JBoss Data Grid in Karaf (OSGi)


Apache Karaf is a powerful, lightweight OSGi-based runtime container into which components and applications are deployed. OSGi implements a dynamic component model that does not exist in standalone JVM environments. OSGi containers such as Karaf include a rich set of tools for managing the life cycle of an application.
All dependencies between individual modules, including version numbers, must be explicitly specified. Where more than one class of the same name exists, the strict rules of OSGi specify which of the classes will be used by your bundle.

4.6.1. Running a Deployment of JBoss Data Grid in Karaf (Remote Client-Server)

The Red Hat JBoss Data Grid Hot Rod client can be run in an OSGi-based container such as Karaf.
Use the path in the JBoss Data Grid Maven repository to set up Karaf. Additionally, JBoss Data Grid requires a features file, located in org/infinispan/infinispan-remote/${VERSION}. This file lists all dependencies for the Hot Rod client in OSGi, while also making it simpler to install the feature into Karaf (version 2.3.3 or 3.0).

4.6.2. Installing the Hot Rod client feature in Karaf

Red Hat JBoss Data Grid's Hot Rod feature is installed in Karaf as follows:
Prerequisite

Configure the Red Hat JBoss Data Grid Maven Repository.

Procedure 4.3. Install the Hot Rod Feature in Karaf

  1. Karaf 2.3.3

    For Karaf 2.3.3 use the following commands:
    1. karaf@root> features:addUrl mvn:org.infinispan/infinispan-remote/${VERSION}/xml/features
      Copy to Clipboard Toggle word wrap
    2. karaf@root> features:install infinispan-remote
      Copy to Clipboard Toggle word wrap
    3. Verify that the feature was successfully installed as follows:
      karaf@root> features:list
       //output
      Copy to Clipboard Toggle word wrap
  2. Karaf 3.0.0

    For Karaf use the following commands.
    1. karaf@root> feature:repo-add mvn:org.infinispan/infinispan-remote/${VERSION}/xml/features
      Copy to Clipboard Toggle word wrap
    2. karaf@root> feature:install infinispan-remote
      Copy to Clipboard Toggle word wrap
    3. Verify that the feature was successfully installed:
      karaf@root> feature:list
      Copy to Clipboard Toggle word wrap
    Alternatively, use the -i command parameter to install the Hot Rod Client feature using the following:
    karaf@root()> feature:repo-add -i mvn:org.infinispan/infinispan-remote/${VERSION}/xml/features
    Copy to Clipboard Toggle word wrap

4.6.3. Installing Red Hat JBoss Data Grid in Karaf (Library Mode)

The Red Hat JBoss Data Grid JAR files contain the required OSGi manifest headers and are used inside OSGi runtime environments as OSGi bundles. Additionally, the required third-party dependencies must be installed. These can be installed individually, or altogether via the features file, which defines all required dependencies.
To install bundles using the features file:
  • Register the feature repositories inside Karaf.
  • Install the features contained in the repositories.

Procedure 4.4. Installing bundles using the features file

  1. Start the Karaf console

    Start the Karaf console using the following commands:
    $ cd $APACHE_KARAF_HOME/bin
    $ ./karaf
    Copy to Clipboard Toggle word wrap
  2. Register a feature repository

    Register a feature repository as follows:
    • For Karaf 2.3.3:
      karaf@root()> features:addUrl mvn:org.infinispan/infinispan-embedded/${VERSION}/xml/features
      Copy to Clipboard Toggle word wrap
      karaf@root> features:install infinispan-embedded
      Copy to Clipboard Toggle word wrap
    • For Karaf 3.0.0:
      karaf@root()> feature:repo-add mvn:org.infinispan/infinispan-embedded/${VERSION}/xml/features
      Copy to Clipboard Toggle word wrap
      karaf@root> feature:install infinispan-embedded
      Copy to Clipboard Toggle word wrap
Result

JBoss Data Grid runs in library mode using Karaf.

The URL for feature repositories is constructed from the Maven artifact coordinates using the following format:
mvn:<groupId>/<artifactId>/<version>/xml/features
Copy to Clipboard Toggle word wrap

Important

The JPA Cache Store is not supported in Apache Karaf in JBoss Data Grid 6.6.

Important

Querying in Library mode (which is covered in the Infinispan Query Guide) is not supported in Apache Karaf in JBoss Data Grid 6.6.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat