Patching a standalone container directs the container to load the patch versions of artifacts instead of the non-patch versions. The patch shell provides commands to patches to the container's environment, see which bundles are effected by applying the patch, apply the patch to the container, and back the patch out if needed.
To make sure that the a patch can be rolled back Fuse ESB Enterprise applies the patch in a
non-destructive manner. The patching process does not overwrite the artifacts included in
the original installation. The patched artifacts are placed in the container's
system folder. When the patch is applied, the container's
configuration is changed so that it points to the patched artifacts instead of the artifacts
from the original installation. This makes it easy for the system to be restored to its
original state or to selectively back out patches.
![]() | Important |
|---|---|
Patches do not persist across installations. If you delete and reinstall a Fuse ESB Enterprise instance you will need to download the patches and reapply them. |
To apply a patch to a standalone container:
Make sure you install all the Apache Karaf features you need before you start to install the patch. If you install any features after installing the patch, the features will install the original unpatched versions of the dependencies—see Adding features to a patched container.
Add the patch to the container's environment using the patch:add command.
Example 33 shows the command for adding the patch contained in the patch file
patch.zipfrom the local file system.This command copies the specified patch file to the container's
systemfolder and unpacks it.Simulate installing the patch using the patch:simulate command.
This will generate a log of the changes that will be made to the container when the patch is installed, but will not make any actual changes to the container.
![[Tip]](imagesdb/tip.gif)
Tip The patch:list command will display a list of all patches added to the container's
systemfolder.Review the simulation log to understand the changes that will be made to the container.
Apply the patch to the container using the patch:install command.
![[Warning]](imagesdb/warning.gif)
Warning Running patch:install before the container is fully started and all of the bundles are active will cause the container to hang.
![[Tip]](imagesdb/tip.gif)
Tip The patch:list command will display a list of all patches added to the container's
systemfolder.
The container will need to restart to apply the patch. If you are using a remote console, you will lose the connection to the container. If you are using the container's local console, it will automatically reconnect when the container restarts.
Occasionally a patch will not work or introduce new issues to a container. In these cases you can easily back the patch out of the system and restore it pre-patch behavior using the patch:rollback command. As shown in Example 34, the command takes the name of patch to be backed out.
![]() | Note |
|---|---|
The
patch:list
command will display a list of all patches added to the container's
|
The container will need to restart to rollback the patch. If you are using a remote console, you will lose the connection to the container. If you are using the container's local console, it will automatically reconnect when the container restarts.
If you need to add some Apache Karaf features to an already patched standalone container, you should proceed as follows:
Roll back the patch, as follows:
JBossA-MQ>patch:rollback patch1Install the additional features you require, using the features:install command.
Apply the patch to the container using the patch:install command.
The container automatically restarts to apply the patch. If you are using a remote console, you will lose the connection to the container. If you are using the container's local console, it will automatically reconnect when the container restarts.






![[Important]](imagesdb/important.gif)
![[Note]](imagesdb/note.gif)


