此内容没有您所选择的语言版本。

A.2. Patching Tasks


Installing a patch

Patches for JBoss Fuse on JBoss EAP are distributed as archive files (.zip) . To install a given patch file, Module-Version.zip, perform the following steps:
  1. Make sure that you read the instructions accompanying the patch file, in case there are extra steps that must be performed to install the patch.
  2. Add the patch file, Module-Version.zip, to your patch repository, as follows:
    $ fusepatch.sh --add file:///path/to/Module-Version.zip
    Copy to Clipboard Toggle word wrap
  3. Use the --query-repository option to check that the patch has been added to the repository:
    $ fusepatch.sh --query-repository
    Module-Version
    Copy to Clipboard Toggle word wrap
  4. Install the patch to the JBoss EAP server, as follows:
    $ fusepatch.sh --install Module-Version
    Installed Module-Version
    Copy to Clipboard Toggle word wrap
  5. Perform any post-install steps documented in the patch instructions.
    Note
    For some patches, it might be necessary to restart the JBoss EAP container for the changes to take effect.

Installing a one-off patch

A one-off patch is a patch that must be installed on top of an existing patch (base patch) and does not contain the full set of paths that an ordinary patch contains. To install a one-off patch, Module-Version.OneOffID.zip, on top of the base patch, Module-Version, perform the following steps:
  1. Make sure that you read the instructions accompanying the one-off patch file, in case there are extra steps that must be performed to install it.
  2. Make sure that the base patch has already been added to your patch repository and installed on the JBoss EAP server. For example, if the base patch is Module-Version, check that it is installed in the repository:
    $ fusepatch.sh --query-repository
    Module-Version
    Copy to Clipboard Toggle word wrap
    And check that it is installed on the JBoss EAP server:
    $ fusepatch.sh --query-server
    Module-Version
    Copy to Clipboard Toggle word wrap
    If the base patch is not already installed, install it now, as described in the section called “Installing a patch”.
  3. Given the one-off patch file, Module-Version.OneOffID.zip, add the patch file to your repository and associate it with the base patch, by entering the following command:
    $ fusepatch.sh --add file:///path/to/Module-Version.OneOffID.zip --one-off Module-Version
    Added Module-Version.OneOffID patching Module-Version
    Copy to Clipboard Toggle word wrap
  4. Update the patch module, Module, on the JBoss EAP server to the latest version:
    $ fusepatch.sh --update Module
    Upgraded from Module-Version to Module-Version.OneOffID
    Copy to Clipboard Toggle word wrap
  5. Perform any post-install steps documented in the patch instructions.
    Note
    For some patches, it might be necessary to restart the JBoss EAP container for the changes to take effect.

Uninstalling a patch

To uninstall a specific patch, Module-Version, from the JBoss EAP server, enter the following command:
$ fusepatch.sh --uninstall Module-Version
Uninstalled Module-Version
Copy to Clipboard Toggle word wrap

Upgrading to a later patch version

You can use the --update option of the fusepatch utility to upgrade the JBoss EAP server to the latest patch version available in the patch repository.
For example, given that the server currently has version 1.0.0 of the Module module installed, while the patch repository includes version 1.1.0, you could upgrade the server to version 1.1.0 by entering the following command:
$ fusepatch.sh --update Module
Upgraded from Module-1.0.0 to Module-1.1.0
Copy to Clipboard Toggle word wrap

Downgrading to an earlier patch version

You can downgrade a patch to an earlier version using the --install option of the fusepatch utility.
For example, given that the server currently has version 1.1.0 of the Module module installed (and assuming that the patch repository includes version 1.0.0), you could downgrade the server to version 1.0.0 by entering the following command:
$ fusepatch.sh --install Module-1.0.0
Downgraded from Module-1.1.0 to Module-1.0.0
Copy to Clipboard Toggle word wrap

Dealing with conflicts

When a patch is applied to a JBoss EAP server (either through the install or update actions), it can happen that the changes about to be made are in conflict with customization previously made by the user. The following cases can arise:
Adding a file that already exists
If the patch attempts to add a file that already exists (and the patch expected there would be no pre-existing file at that location), the patch install (or update) action fails:
$ mkdir config; touch config/propsA.properties

$ fusepatch.sh --update Module
Error: Attempt to add an already existing file config/propsA.properties
Copy to Clipboard Toggle word wrap
If this happens, you have the option of re-issuing the fusepatch command with the --force option, which over-writes the conflicting file—for example:
$ fusepatch.sh --update Module --force
Warning: Overriding an already existing file config/propsA.properties
Installed Module-1.0.0
Copy to Clipboard Toggle word wrap
Upgrading a file that has been customized
In the case of existing files with the .xml or .properties extensions, the patch mechanism checks whether the files have been customized by the user before applying any modifications. If there are any customized files that would be affected by the patch, the install (or update) action fails by default:
$ fusepatch.sh --update Module
Error: Attempt to override an already modified file config/propsA.properties
Copy to Clipboard Toggle word wrap
If this happens, you have the option of re-issuing the fusepatch command with the --force option, which over-writes the conflicting file—for example:
$ fusepatch.sh --update Module --force
Warning: Overriding an already modified file config/propsA.properties
Upgraded from Module-1.0.0 to Module-1.1.0
Copy to Clipboard Toggle word wrap
Removing a file that has already been removed
If the patch attempts to remove a file that has already been removed, a warning is displayed, but the patch install (or update) action succeeds by default:
$ rm config/remove-me.properties 

$ fusepatch.sh --update Module
Warning: Attempt to delete a non existing file config/remove-me.properties
Upgraded from Module-1.0.0 to Module-1.1.0
Copy to Clipboard Toggle word wrap

Checking the audit log

The JBoss EAP server maintains an audit log of all the changes made by the fusepatch utility. You can access the audit log by invoking the fusepatch command with the --audit-log option. For example, if you install module foo version 1.0.0, and subsequently update module foo to version 1.1.0, as follows:
$ fusepatch.sh --install foo-1.0.0
Installed foo-1.0.0

$ fusepatch.sh --update foo
Upgraded from foo-1.0.0 to foo-1.1.0
Copy to Clipboard Toggle word wrap
To display the server's audit log enter the following command:
$ fusepatch.sh --audit-log

# 19-Jun-2015 12:22:04
# Installed foo-1.0.0

[content]
ADD config/propsA.properties 1684822571
ADD config/remove-me.properties 1684822571
ADD lib/foo-1.0.0.jar 2509787836

# 19-Jun-2015 12:22:13
# Upgrading from foo-1.0.0 to foo-1.1.0

[content]
UPD config/propsA.properties 1329662440
DEL config/remove-me.properties 1684822571
DEL lib/foo-1.0.0.jar 2509787836
ADD lib/foo-1.1.0.jar 2509787836
Copy to Clipboard Toggle word wrap
The audit log shows the files that were added, ADD, deleted, DEL, or updated, UPD, for each of the install and update actions.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat