Language and Page Formatting Options
9.6. Control the order of Deployed Applications on JBoss EAP 6
JBoss EAP 6 offers fine grained control over the order of deployment of applications when the server is started. Strict order of deployment of applications present in multiple ear files can be enabled along with persistence of the order after a restart.
Procedure 9.13. Control the order of deployment in EAP 6.0.X
- 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.
Procedure 9.14. Control the order of deployment in EAP 6.1.X
A new feature in EAP 6.1.X called Inter Deployment Dependencies allows you to declare dependencies between top level deployments.
- Create (if it doesn't exist) a
jboss-all.xmlfile in the
app.earis the application archive that depends on another application archive to be deployed before it is.
- Make a
jboss-deployment-dependenciesentry in this file as shown below. Note that in the listing below,
framework.earis the dependency application archive that should be deployed before
app.earapplication archive is.
<jboss umlns="urn:jboss:1.0"> <jboss-deployment-dependencies xmlns="urn:jboss:deployment-dependencies:1.0"> <dependency name="framework.ear" /> </jboss-deployment-dependencies> </jboss>