Can the redeployment or undeployment order be set on the dependent applications in EAP6 ?
- Red Hat JBoss Enterprise Application Platform (EAP)
- Red Hat JBoss Fuse Service Works (FSW)
- Several deployed applications dependent on another one. When I redeploy this last one, the dependent applications are not redeployed.
- If an application
"app1.ear"is dependent on the
"app2.ear". Then when the
"app1.ear"is undeployed then the following error is observed in the logs.
0:15:52,539 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015877: Stopped deployment null (runtime-name: singleton-and-ejb.jar) in 9052ms 10:15:52,542 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015877: Stopped deployment app1.ear (runtime-name: app1.ear) in 9055ms 10:15:52,656 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018558: Undeployed "app1.ear" (runtime-name: "app1.ear") 10:15:52,658 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report JBAS014775: New missing/unsatisfied dependencies: service jboss.deployment.unit."app1.ear".deploymentCompleteService (missing) dependents: [service jboss.deployment.subunit."app2.ear"."singleton.jar".PARSE, service jboss.deployment.unit."app2.ear".PARSE]
- Is that normal? Can the application redeployment/undeployment order be set?
For setting the Order of Deployment From EAP 6.1 onwards a feature
"jboss-all.xml"was added as per the KCS
For EAP 6.0 there is no such option available which will make the dependent application to get undeployed/redeployed automatically. However following suggestions can be adopted:
- Use the jboss-cli script or the other management utilities to undeploy the applications in the same order in which they are dependent. for example create CLI scripts that will deploy and undeploy the applications in sequential order when the server is started/stopped. CLI also supports the concept of batch mode which allows you to group commands and operations and execute them together as an atomic unit. If at least one of the commands or operations fails, all the other successfully executed commands and operations in the batch are rolled back.
- Else package then as part of a single deployable entity (like a single EAR)
Related articles and documentation
How to control the order of deployed applications on JBoss EAP 6
EAP 6.1 Administration Guide - Control the order of Deployed Applications on JBoss EAP
- Learn more
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.