Upgrading and patching the Red Hat JBoss Enterprise Application Platform (JBoss EAP)

One of the biggest advantages, besides the support for the Red Hat JBoss Enterprise Middleware are the access to continuous updates and bug fixes. In previous versions, minor patches could not be applied automatically, also updates or bug fixes had to be installed manually, by changing individual configuration files and replacing Java Archives.

Since version 6.2 the Command Line Interface of the JBoss Enterprise Application Platform (EAP) contains a command to apply minor updates and patches without changing individual files manually.

Using CLI patch command

Red Hat provides the patches and updates via the customer portal as download. Customers have the option to subscribe notifications about new patches or updates. After downloading a single or bundled patch from the customer portal, the patch can be applied with the patch command of the Command Line Interface (CLI).

[standalone@localhost:9999/] patch apply ../../jboss-eap-6.2.2.zip
{
    "outcome" : "success",
    "response-headers" : {
        "operation-requires-restart" : true,
        "process-state" : "restart-required"
    }
}

When the patch is installed, the application server requires a restart, also executable with the CLI.

[standalone@localhost:9999/] :shutdown(restart=true)

You can display the information about the history of the installed patches using the patch history command. Additionally the patch info command can show you all currently installed patches.

[standalone@localhost:9999/] patch history
{
    "outcome" : "success",
    "result" : [
        {
            "patch-id" : "jboss-eap-6.2.2.CP",
            "type" : "cumulative",
            "applied-at" : "15.04.14 18:15"
        },
        {
            "patch-id" : "jboss-eap-6.2.1.CP",
            "type" : "cumulative",
            "applied-at" : "15.04.14 18:15"
        }
    ]
}

This information are stored in the .installation directory inside the JBOSS_HOME directory of the JBoss Application Server. Be careful manipulating this directory, because changed files and the last configuration to perform a rollback are stored in this directory. However, it is always recommendable to make a backup before applying a patch.

[standalone@localhost:9999/] patch rollback --patch-id=jboss-eap-6.2.2.CP --reset-configuration=true
{
    "outcome" : "success",
    "response-headers" : {
        "operation-requires-restart" : true,
        "process-state" : "restart-required"
    }
}

New or updated modules are located in the .overlay directory inside the modules/system/layer/base directory.

The specified examples of the patch command can also be used in domain mode to apply patches to the domain and host controller.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s