Ce contenu n'est pas disponible dans la langue sélectionnée.
2.3. Configuring the Service Wrapper
Overview Copier lienLien copié sur presse-papiers!
Copier lienLien copié sur presse-papiers!
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 Copier lienLien copié sur presse-papiers!
Copier lienLien copié sur presse-papiers!
The following environment variables determine the broker environment:
- JAVA_HOME
- Location of the Java runtime installation.NoteOn Windows, you can set
JAVA_HOMEeither as a system variable only in the registry or inServiceName-wrapper.conf. You cannot set the variable as a regular environment variable in the Environment Variables list. - KARAF_HOME
- Location of the Red Hat JBoss Fuse installation.
- KARAF_BASE
- Location of the configuration data and OSGi data for the broker instance.NoteRuntime OSGi data is stored in sub-directories of this directory.
- KARAF_DATA
- Location of the logging and persistance data for the broker instance.
Example 2.1, “Default Environment Settings” describes the default environment variable values.
Example 2.1. Default Environment Settings
set.default.KARAF_HOME=InstallDir set.default.KARAF_BASE=InstallDir set.default.KARAF_DATA=InstallDir\data
set.default.KARAF_HOME=InstallDir
set.default.KARAF_BASE=InstallDir
set.default.KARAF_DATA=InstallDir\data
JVM parameters Copier lienLien copié sur presse-papiers!
Copier lienLien copié sur presse-papiers!
If you want to pass parameters to the JVM, you set the wrapper properties in the following format:
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
The parameter sequence number must be unique for each parameter.
wrapper.java.additional.<param_sequence_number>
wrapper.java.additional.<param_sequence_number>
You can also set Java system properties in the following format:
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
wrapper.java.additional.<n>=-DPropName=PropValue
wrapper.java.additional.<n>=-DPropName=PropValue
Example 2.2, “Default Java System Properties” shows the default Java properties.
Example 2.2. Default Java System Properties
Additional classpath entries Copier lienLien copié sur presse-papiers!
Copier lienLien copié sur presse-papiers!
You add classpath entries with the syntax format:
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
The sequence number must be unique for each classpath entry.
wrapper.java.classpath.<n>
wrapper.java.classpath.<n>
Example 2.3, “Default Wrapper Classpath” shows the default classpath entries.
Example 2.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
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
JMX configuration properties Copier lienLien copié sur presse-papiers!
Copier lienLien copié sur presse-papiers!
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.
Example 2.4, “Wrapper JMX Properties” shows the JMX template properties.
Example 2.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
#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
- Locate the following line:
# Uncomment to enable jmx - Remove the prefix
#from each of the properties. - Replace the
nin 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 Copier lienLien copié sur presse-papiers!
Copier lienLien copié sur presse-papiers!
You can set logging properties to control the level, frequency, and behavior of the wrapper logs.
Table 2.2, “Wrapper Logging Properties” lists the default logging properties.
| Property | Description |
|---|---|
wrapper.console.format |
Specifies how the logging information sent to the console is formated. The format consists of the following tokens:
|
wrapper.console.loglevel | Specifies the logging level displayed on the console. |
wrapper.logfile | Specifies the file used to store the log. |
wrapper.logfile.format | Specifies how the logging information sent to the log file is formated. |
wrapper.console.loglevel | Specifies the logging level sent to the log file. |
wrapper.console.maxsize | Specifies 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.maxfiles | Specifies 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.loglevel | Specifies the logging level for the sys/event log output. |