Red Hat AMQ 6
As of February 2025, Red Hat is no longer supporting Red Hat AMQ 6. If you are using AMQ 6, please upgrade: Migrating to AMQ 7.此内容没有您所选择的语言版本。
A.2. Editing OSGi Config Admin Properties
Overview 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
This section explains how to use the built-in text editor to edit the property settings associated with a specific persistent ID.
Persistent ID 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
In the context of the OSGi Config Admin service, a persistent ID (PID) refers to and identifies a set of related properties. In particular, when defining PID property settings in a profile, the properties associated with the
PID
persistent ID are defined in the PID.properties
resource.
Open the Config Admin properties resource 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
To start editing the properties associated with the
PID
persistent ID, enter the following console command:
JBossFuse:karaf@root> profile-edit --pid PID Profile [Version]
JBossFuse:karaf@root> profile-edit --pid PID Profile [Version]
Note
It is also possible to edit PID properties by specifying
--resource PID.properties
in the profile-edit
command, instead of using the --pid PID
option.
Specifying OSGi config admin properties 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
The text editor opens, showing the contents of the specified profile's
PID.properties
resource (which is actually stored in the ZooKeeper registry). To edit the properties, add, modify, or delete lines of the following form:
Property=Value
Property=Value
Example 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
To edit the properties for the
io.fabric8.hadoop
PID in the hadoop-base
profile, enter the following console command:
JBossFuse:karaf@root> profile-edit --resource io.fabric8.hadoop.properties hadoop-base 1.0
JBossFuse:karaf@root> profile-edit --resource io.fabric8.hadoop.properties hadoop-base 1.0
The text editor starts up, and you should see the following screen in the console window:
You might notice that colon characters are escaped in this example (as in
\:
). Strictly speaking, it is only necessary to escape a colon if it appears as part of a property name (left hand side of the equals sign), but the profile-edit
command automatically escapes all colons when it writes to a resource. When manually editing resources using the text editor, however, you do not need to escape colons in URLs appearing on the right hand side of the equals sign.
Type
^X
to quit the text editor and get back to the console prompt.