Chapter 6. Installing Red Hat JBoss A-MQ as a Service


Abstract

You can install JBoss A-MQ as a system service with a service wrapper for the broker. You first generate the service wrapper, configure the wrapper for your system, and then install and start the service.

6.1. Generating the Service Wrapper

Overview

The Red Hat JBoss A-MQ console wrapper feature generates a wrapper around the JBoss A-MQ runtime instance. You use the wrapper to install the messsage broker as a system service. The wrapper feature is not installed by default in the console, so before you can generate the service wrapper you must install the wrapper feature.
After the feature is installed the console gains a wrapper:install command. Running this command generates a generic service wrapper in the JBoss A-MQ installation.

Generating the service wrapper

  1. Start JBoss A-MQ in console mode with the amq command.
  2. Enter features:install wrapper.
    The features:install command locates the required libraries to provision the wrapper feature and deploys it into the runtime instance.
  3. Generate the wrapper with the wrapper:install command in the following format:
      wrapper:install -n <serviceName> -d <displayName> -D <<description>
    The Table 6.1, “Wrapper Install Options” table describes the wrapper:install options.
    Table 6.1. Wrapper Install Options
    OptionDefaultDescription
    -sAUTO_START(Windows only) Specifies the mode in which the service is installed. Valid values are AUTO_START or DEMAND_START.
    -nkarafSpecifies the service name that will be used when installing the service.
    -d Specifies the display name of the service.
    -D Specifies the description of the service.
    -i --include Specifies an include statement for the JSW wrapper configuration. To specify multiple include statement, enter this option multiple times.
    -e --env Specifies environment variable and values. To set multiple environment variable and values, enter this option multiple times.

Results

The wrapper:install command generates the following wrapper files:
  • bin\ServiceName-wrapper[.exe]—the executable file for the wrapper.
  • bin\ServiceName-service[.bat]—the script used to install and remove the service.
  • etc\ServiceName-wrapper.conf—the wrapper configuration file.
The command also creates the following libraries that the service wrapper requires:
  • lib\libwrapper.so
  • lib\karaf-wrapper.jar
  • lib\karaf-wrapper-main.jar
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.