10.5. Single State Machine

All Microcontainer components are handled by a single entry point, or single state machine. Deployments are no exception.
You can take advantage of this feature by using the jboss-dependency.xml configuration file in your deployments.

Example 10.5. jboss-dependency.xml

<dependency xmlns="urn:jboss:dependency:1.0">
  <item whenRequired="Real" dependentState="Create">TransactionManager</item> (1)
  <item>my-human-readable-deployment-alias</item> (2)
</dependency>
Note the artificial call-outs in the XML: (1) and (2).
(1) shows how to describe dependency on another service. This example requires TransactionManager to be created before the deployment is in the 'Real' stage.
(2) is a bit more complex, since you are missing additional information. By default, deployment names inside the Microcontainer are URI names, which makes typing them by hand an error prone proposition. So, in order to be able to easily declare dependence on other deployments, you need an aliasing mechanism to avoid URI names. You can add a plain text file named aliases.txt into your deployment. Each line of the file contains an alias, giving a deployment archive one or more simple names used to refer to it.