title: What's the module name if deploy jdbc in Jboss AS 7 as web application
body: <p>From this <a href="https://stackoverflow.com/questions/16414426/configure-jdbc-driver-in-jboss-7-as-a-deployment-or-as-a-module">post</a> start from Jboss AS7 the jdbc driver is able to deploy as regular application. However a question is, how other application is able to refer to this jdbc jar?</p>
  
  <p>here is what I tried but it doesn't work</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0"&gt;
  ......
  &lt;deployment&gt;
      &lt;dependencies&gt;
          &lt;module name="ojdbc6.jar" /&gt;
      &lt;/dependencies&gt;
  &lt;/deployment&gt;
  .....
  &lt;/jboss-deployment-structure&gt;
  </code></pre>
  
  <h2>UPDATE</h2>
  
  <p>When I deploy ojdbc.jar there is a section of log from console:</p>
  
  <pre><code>10:56:20,416 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015876: Starting deployment of "ojdbc6.jar"
  10:56:21,487 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2) JBAS010403: Deploying JDBC-compliant driver class oracle.jdbc.OracleDriver (version 11.2)
  10:56:21,489 INFO  [org.jboss.as.osgi] (MSC service thread 1-7) JBAS011907: Register module: Module "deployment.ojdbc6.jar:main" from Service Module Loader
  10:56:21,499 INFO  [org.jboss.as.server] (HttpManagementService-threads - 6) JBAS018559: Deployed "ojdbc6.jar"
  </code></pre>
  
  <p>Per the log jdbc module is with name <code>deployment.ojdbc6.jar:main</code>, but after I update jboss-deployment-structure.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0"&gt;
  ......
  &lt;deployment&gt;
      &lt;dependencies&gt;
          &lt;module name="deployment.ojdbc6.jar:main" /&gt;
      &lt;/dependencies&gt;
  &lt;/deployment&gt;
  .....
  &lt;/jboss-deployment-structure&gt;
  </code></pre>
  
  <p>it still does not work. with following message:</p>
  
  <pre><code>10:59:34,448 INFO  [org.jboss.as.server] (HttpManagementService-threads - 7) JBAS015870: Deploy of deployment "MyApp.war" was rolled back with failure message {"JBAS014771: Services with missing/unavailable dependencies" =&gt; ["jboss.deployment.unit.\"MyApp.war.war\".POST_MODULE Missing[JBAS014861: &lt;one or more transitive dependencies&gt;]","jboss.module.service.\"deployment.MyApp.war.war\".main Missing[jboss.module.spec.service.\"deployment.ojdbc6.jar:main\".main]"]}
  10:59:35,198 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015877: Stopped deployment MyApp.war.war in 749ms
  </code></pre>