Managing WildFly and EAP patches

Patching the application server is e mechanism by which you can commit or rollback changes to the application server libraries – see the first article about it: Patching WildFly application server Patching the application server has however some implications if you want to apply further changes to the application server modules

Let’s see an example. Here is a patched JBoss EAP 6.4.6. Things work pretty much the same on WildFly. Let’s have a look at the modules of the application server:

$ cd modules/system/layers/base/
$ ls -al
total 56
drwxrwxr-x 14 jboss jboss 4096 Apr  6 16:01 .
drwxrwxr-x  3 jboss jboss 4096 Mar 27  2015 ..
drwxrwxr-x  3 jboss jboss 4096 Mar 27  2015 asm
drwxrwxr-x  3 jboss jboss 4096 Mar 27  2015 ch
drwxrwxr-x  6 jboss jboss 4096 Mar 27  2015 com
drwxrwxr-x  3 jboss jboss 4096 Mar 27  2015 gnu
drwxrwxr-x  3 jboss jboss 4096 Mar 27  2015 javaee
drwxrwxr-x 26 jboss jboss 4096 Mar 27  2015 javax
drwxrwxr-x  3 jboss jboss 4096 Mar 27  2015 net
drwxrwxr-x  3 jboss jboss 4096 Mar 27  2015 nu
drwxrwxr-x 27 jboss jboss 4096 Mar 27  2015 org
drwxrwxr-x  8 jboss jboss 4096 Apr  6 16:02 .overlays
drwxrwxr-x  3 jboss jboss 4096 Mar 27  2015 sun

As you can see a directory named .overlays is included. Let’s look in it:

$ ls .overlays/
layer-base-jboss-eap-6.4.1.CP  layer-base-jboss-eap-6.4.3.CP  layer-base-jboss-eap-6.4.5.CP
layer-base-jboss-eap-6.4.2.CP  layer-base-jboss-eap-6.4.4.CP  layer-base-jboss-eap-6.4.6.CP

Here, you have different layers for your modules. On each folder you can find the modules related to that patch. Why is this important ? Because if you are going to apply changes to the modules of the server, then you have to apply them in the related layer of the patch.

Let’s say you are going to patch the Hibernate libs on EAP 6.4.6: then you have to operate on the libraries contained in the folder: /space/jboss/jboss-eap-6.4/modules/system/layers/base/.overlays/layer-base-jboss-eap-6.4.6.CP/org/jboss/as/jpa/hibernate

If you want details about the patch history on the Host Controller say named slave1, that was applied, then issue from the CLI:

[domain@master:9999 /] patch history --host=slave1
{
    "outcome" : "success",
    "result" : [
        {
            "patch-id" : "jboss-eap-6.4.6.CP",
            "type" : "cumulative",
            "applied-at" : "4/6/16 4:00 PM"
        },
        {
            "patch-id" : "jboss-eap-6.4.5.CP",
            "type" : "cumulative",
            "applied-at" : "4/6/16 4:00 PM"
        },
        {
            "patch-id" : "jboss-eap-6.4.4.CP",
            "type" : "cumulative",
            "applied-at" : "4/6/16 4:00 PM"
        },
        {
            "patch-id" : "jboss-eap-6.4.3.CP",
            "type" : "cumulative",
            "applied-at" : "4/6/16 4:00 PM"
        },
        {
            "patch-id" : "jboss-eap-6.4.2.CP",
            "type" : "cumulative",
            "applied-at" : "4/6/16 4:00 PM"
        },
        {
            "patch-id" : "jboss-eap-6.4.1.CP",
            "type" : "cumulative",
            "applied-at" : "4/6/16 4:00 PM"
        }
    ],
    "server-groups" : null
}

Additionally, a file named “version.txt” is available in the JBOSS_HOME directory, containing the last applied patch:

$ cat version.txt 
Red Hat JBoss Enterprise Application Platform - Version 6.4.6.GA
Found the article helpful? if so please follow us on Socials