title: In JBoss 7.1.1, how can I make my WAR dependent on my EAR
body: <p>I'm migrating my 4.2.2 JBoss app to 7.1.1. I have most of it working, but I occasionally get an error when my WAR file loads prior to an EAR file that it uses for database access.</p>
  
  <p>I am currently delaying the load of the WAR by placing it in a sub-directory of the deployments directory, but this seems like such a kludge.</p>
  
  <p>I have tried putting the EAR file in as a module and them making the WAR depend on it through the jboss-deployment-structure.xml file placed in the war. This seems to load fine, but then the database access isn't getting pushed through.</p>
  
  <p>I have tried adding the ear to the dependencies tag in the WAR's manifest, but doesn't work either.</p>
  
  <p>Is there a better way to do this?</p>