What is a difference between undeploy-disable application in EAP 6
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
Issue
- What is a difference between undeploy-disable application in EAP 6
Resolution
Deploying An Application
- When user deploys an application, suppose named
TestApp.warin the server group, then JBoss writes following entries in different locations:
domain.xml
- Under deployments tag
<deployments>
.
.
.
<deployment name="TestApp.war" runtime-name="TestApp.war">
<content sha1="aa129f0f45e0eef977f12138be4632ae472aec88"/>
</deployment>
.
.
.
</deployments>
- Under server group tag
<server-group name="main-server-group" profile="full">
.
.
.
<deployments>
<deployment name="TestApp.war" runtime-name="TestApp.war"/>
</deployments>
.
.
.
</server-group>
$JBOSS_HOME/domain/data
- JBoss will put an application's content into a directory like
$JBOSS_HOME/domain/data/content/aa/129f0f45e0eef977f12138be4632ae472aec88, where the short folder name is the first two characters of the hexadecimal sha1 sum, and the longer folder name is the rest of the sha1 sum. This content will available to all server groups.
$JBOSS_HOME/domain/servers/$SERVER_NAME/data
- An applications content is put into a directory like
$JBOSS_HOME/domain/servers/server-one/data/content/aa/129f0f45e0eef977f12138be4632ae472aec88.
$JBOSS_HOME/domain/servers/$SERVER_NAME/tmp
- There is also entry of an application added in the
$JBOSS_HOME/domain/servers/server-one/tmp/vfs/tempd2bf0ef4174eb980/content-9fc0d94c90616b63directory.
Console Log
- In the logs there is following type of entries will be written.
[Server:server-one] 14:37:53,143 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 6-JBAS010281: Started default-host/TestApp cache from web container
[Server:server-two] 14:37:53,144 INFO [org.infinispan.jmx.CacheJmxRegistration] (ServerService Thread Pool -- 6-ISPN000031: MBeans were successfully registered to the platform MBean server.
[Server:server-two] 14:37:53,145 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 6-JBAS010281: Started local-web cache from web container
[Server:server-two] 14:37:53,145 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 6-JBAS010281: Started default-host/TestApp cache from web container
[Server:server-one] 14:37:53,148 INFO [org.jboss.web] (ServerService Thread Pool -- 6-JBAS018210: Register web context: /TestApp
[Server:server-two] 14:37:53,154 INFO [org.jboss.web] (ServerService Thread Pool -- 6-JBAS018210: Register web context: /TestApp
[Server:server-two] 14:37:53,360 INFO [org.jboss.as.server] (host-controller-connection-threads - -JBAS018559: Deployed "TestApp.war" (runtime-name : "TestApp.war")
[Server:server-one] 14:37:53,360 INFO [org.jboss.as.server] (host-controller-connection-threads - -JBAS018559: Deployed "TestApp.war" (runtime-name : "TestApp.war")
Disabling An Application
- Disable an application from the management console, then JBoss removes/changes following entries.
domain.xml
- In
domain.xml. JBoss only disables an application and set enabled flag equal to false.
<server-group name="main-server-group" profile="full">
.
.
.
<deployments>
<deployment name="TestApp.war" runtime-name="TestApp.war" enabled="false"/>
</deployments>
.
.
.
</server-group>
$JBOSS_HOME/domain/servers/$SERVER_NAME/tmp
- Also JBoss removes entry of an application from the
$JBOSS_HOME/domain/servers/server-one/tmp/vfs/tempd2bf0ef4174eb980/directory.
Console Log
- In the logs there is following type of entries will be written.
[Server:server-one] 14:43:17,522 INFO [org.jboss.web] (ServerService Thread Pool -- 68) JBAS018224: Unregister web context: /TestApp
[Server:server-two] 14:43:17,524 INFO [org.jboss.web] (ServerService Thread Pool -- 67) JBAS018224: Unregister web context: /TestApp
[Server:server-one] 14:43:17,637 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1--JBAS010282: Stopped default-host/TestApp cache from web container
[Server:server-two] 14:43:17,637 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1--JBAS010282: Stopped default-host/TestApp cache from web container
[Server:server-one] 14:43:17,645 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1--JBAS010282: Stopped local-web cache from web container
[Server:server-two] 14:43:17,653 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1--JBAS010282: Stopped local-web cache from web container
[Server:server-one] 14:43:17,665 INFO [org.jboss.as.server.deployment] (MSC service thread 1--JBAS015877: Stopped deployment TestApp.war (runtime-name: TestApp.war) in 149ms
[Server:server-two] 14:43:17,668 INFO [org.jboss.as.server.deployment] (MSC service thread 1--JBAS015877: Stopped deployment TestApp.war (runtime-name: TestApp.war) in 151ms
[Server:server-one] 14:43:17,849 INFO [org.jboss.as.server] (host-controller-connection-threads - -JBAS018558: Undeployed "TestApp.war" (runtime-name: "TestApp.war")
[Server:server-two] 14:43:17,849 INFO [org.jboss.as.server] (host-controller-connection-threads - -JBAS018558: Undeployed "TestApp.war" (runtime-name: "TestApp.war")
- And After the restart of domain controller there is also option to enable an application. Because JBoss never removes the content from the servers when user disables an application.
Conclusion:
- Hence after the all testing and observation we can now conclude that disable means JBoss only disable the application from the servers and will not remove any entries of an application.
- Here the meaning of disable and undeploy will be same.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
