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

6.3. Configuring the Service Wrapper


Overview

You can configure the service wrapper in the ServiceName-wrapper.conf file, which is located under the InstallDir/etc/ directory.
For example, you might want to change any of the following settings:
  • default environment settings
  • properties passed to the JVM
  • Classpath
  • JMX settings
  • logging settings

Default environment settings

The following environment variables determine the broker environment:
KARAF_HOME
Location of the Red Hat JBoss A-MQ installation.
KARAF_BASE
Location of the configuration data and OSGi data for the broker instance.
Note
Runtime OSGi data is stored in sub-directories of this directory.
KARAF_DATA
Location of the logging and persistance data for the broker instance.
Example 6.1, “Default Environment Settings” describes the default environment variable values.

Example 6.1. Default Environment Settings

set.default.KARAF_HOME=InstallDir
set.default.KARAF_BASE=InstallDir
set.default.KARAF_DATA=InstallDir\data
Copy to Clipboard Toggle word wrap

JVM parameters

If you want to pass parameters to the JVM, you set the wrapper properties in the following format:
wrapper.java.additional.<param_sequence_number>wrapper.java.additional.<param_sequence_number>
Copy to Clipboard Toggle word wrap
The parameter sequence number must be unique for each parameter.
You can also set Java system properties in the following format:
wrapper.java.additional.<n>=-DPropName=PropValuewrapper.java.additional.<n>=-DPropName=PropValuewrapper.java.additional.<n>=-DPropName=PropValuewrapper.java.additional.<n>=-DPropName=PropValuewrapper.java.additional.<n>=-DPropName=PropValuewrapper.java.additional.<n>=-DPropName=PropValue
Copy to Clipboard Toggle word wrap
Example 6.2, “Default Java System Properties” shows the default Java properties.

Example 6.2. Default Java System Properties

# JVM
# note that n is the parameter number starting from 1.
wrapper.java.additional.1=-Dkaraf.home="%KARAF_HOME%"
wrapper.java.additional.2=-Dkaraf.base="%KARAF_BASE%"
wrapper.java.additional.3=-Dkaraf.data="%KARAF_DATA%"
wrapper.java.additional.4=-Dcom.sun.managment.jmxremote
wrapper.java.additional.5=-Dkaraf.startLocalConsole=false
wrapper.java.additional.6=-Dkaraf.startRemoteShell=true
wrapper.java.additional.7=-Djava.endorsed.dirs="%JAVA_HOME%/jre/lib/endorsed;%JAVA_HOME%/lib/endorsed;%KARAF_HOME%/lib/endorsed"
wrapper.java.additional.8=-Djava.ext.dirs="%JAVA_HOME%/jre/lib/ext;%JAVA_HOME%/lib/ext;%KARAF_HOME%/lib/ext"
Copy to Clipboard Toggle word wrap

Additional classpath entries

You add classpath entries with the syntax format:
 wrapper.java.classpath.<n>wrapper.java.classpath.<n>
Copy to Clipboard Toggle word wrap
The sequence number must be unique for each classpath entry.
Example 6.3, “Default Wrapper Classpath” shows the default classpath entries.

Example 6.3. Default Wrapper Classpath

wrapper.java.classpath.1=%KARAF_BASE%/lib/karaf-wrapper.jar
wrapper.java.classpath.2=%KARAF_HOME%/lib/karaf.jar
wrapper.java.classpath.3=%KARAF_HOME%/lib/karaf-jaas-boot.jar
wrapper.java.classpath.4=%KARAF_BASE%/lib/karaf-wrapper-main.jar
Copy to Clipboard Toggle word wrap

JMX configuration properties

The default service wrapper configuration does not enable JMX. However, it includes template properties that you can set to enable JMX. For example, you can change the settings to use a different port or secure the JMX connection.
For more information about using JMX see Chapter 15, Using JMX.
Example 6.4, “Wrapper JMX Properties” shows the JMX template properties.

Example 6.4. Wrapper JMX Properties

#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616
#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.authenticate=false
#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.ssl=false
Copy to Clipboard Toggle word wrap
  1. Locate the following line: # Uncomment to enable jmx
  2. Remove the prefix # from each of the properties.
  3. Replace the n in each property with a sequence number. Make sure that the number adheres to the sequence of all parameters and properties in the configuration file.

Logging configuration

You can set logging properties to control the level, frequency, and behavior of the wrapper logs.
Table 6.2, “Wrapper Logging Properties” lists the default logging properties.
Expand
Table 6.2. Wrapper Logging Properties
PropertyDescription
wrapper.console.format
Specifies how the logging information sent to the console is formated. The format consists of the following tokens:
  • L—log level
  • P—prefix
  • D—thread name
  • T—time
  • Z—time in milliseconds
  • U—approximate uptime in seconds (based on internal tick counter)
  • M—message
wrapper.console.loglevelSpecifies the logging level displayed on the console.
wrapper.logfileSpecifies the file used to store the log.
wrapper.logfile.formatSpecifies how the logging information sent to the log file is formated.
wrapper.console.loglevelSpecifies the logging level sent to the log file.
wrapper.console.maxsizeSpecifies the maximum size, in bytes, that the log file can grow to before the log is archived. The default value of 0 disables log rolling.
wrapper.console.maxfilesSpecifies the maximum number of archived log files which will be allowed before old files are deleted. The default value of 0 implies no limit.
wrapper.syslog.loglevelSpecifies the logging level for the sys/event log output.
For more information about Red Hat JBoss A-MQ logging see Chapter 14, Using Logging.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

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

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

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

Red Hat 소개

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

Theme

© 2025 Red Hat