<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Re: Deployment Order With Spring
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/mrjb">mrjb</a> in <i>Snowdrop</i> - <a href="https://community.jboss.org/message/741081#741081">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>*bump*</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I am also interested in how to solve this. I would suspect I have a pretty basic use case, using JBoss 7.1.1, Snowdrop 2.0.2 and Spring 3.1.1. My application in it's simplest form looks like this:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-size: 10pt; font-family: 'courier new', courier;"><code style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"><span class="pln">myapp</span><span class="pun">.</span><span class="pln">ear<br/></span><span class="pun">|</span><span class="pln"><br/></span><span class="pun">+-</span><span class="pln"> META</span><span class="pun">-</span><span class="pln">INF<br/></span><span class="pun">|</span><span class="pln">  </span><span class="pun">|</span><span class="pln"><br/></span><span class="pun">|</span><span class="pln">  </span><span class="pun">+-</span><span class="pln"> MANIFEST</span><span class="pun">.</span><span class="pln">MF<br/></span><span class="pun">|</span><span class="pln">  </span><span class="pun">+-</span><span class="pln"> application</span><span class="pun">.</span><span class="pln">xml<br/></span><span class="pun">|</span><span class="pln"><br/></span><span class="pun">+-</span><span class="pln"> lib<br/></span><span class="pun">|</span><span class="pln">  </span><span class="pun">|</span><span class="pln"><br/></span></code></span></p><p><span style="font-size: 10pt; font-family: 'courier new', courier;"><span class="pun">|</span><span class="pln">  </span><span class="pun">+-</span><span class="pln"> spring-3.1.1-jars</span><span class="pun">.</span><span class="pln">jar</span></span></p><p><span style="font-size: 10pt; font-family: 'courier new', courier;"><span class="pun">|</span><span class="pln">  </span><span class="pun">+-</span><span class="pln"> other-jars</span><span class="pun">.</span><span class="pln">jar<br/></span></span></p><p><span style="font-size: 10pt; font-family: 'courier new', courier;"><code style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"><span class="pun">|</span></code></span></p><p><span style="font-size: 10pt; font-family: 'courier new', courier;"><code style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"><span class="pun">+-</span><span class="pln"> myapp</span><span class="pun">.</span><span class="pln">spring</span></code></span></p><p><span style="font-size: 10pt; font-family: 'courier new', courier;"><code style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"><span class="pun">+-</span><span class="pln"> myapp</span><span class="pun">.</span><span class="pln">war</span></code></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>My .war has a beanRefContext.xml that is trying to lookup the JNDI name that the SpringDeployer should have registered, which fails because the JNDI name is not found. There is also some randomness attached to this because for a while it did actually work, the JNDI name was found and deployment continued. I then copied some .jars on the JBoss servers, which I suspect might have modified their timestamps or something similar, in case that's one of the factors for deciding deployment order, and after that it has stopped working. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>My application.xml file looks like this:</p><p><span style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"><br/></span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"><application></span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">  (...)</span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">  <initialize-in-order>true</initialize-in-order></span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">  <module></span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">    <java>./myapp.spring</java></span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">  </module></span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">  <module></span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">    <web></span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">      <web-uri><span style="font-family: 'courier new', courier; font-size: 11px;">myapp</span>.war</web-uri></span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">      <context-root><span style="font-family: 'courier new', courier; font-size: 11px;">myapp</span></context-root></span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">    </web></span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;">  </module></span></p><p><span style="font-family: 'courier new', courier; font-size: 8pt;"></...></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I can't managed to get this working... My company is using JBoss 4.2 and there it is working fine, but we are figuring it's time to upgrade. I don't really need to keep the same deployment structure either it's just that I want a main Spring context to be deployed that other WAR's (and also MDB's) can access.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Any ideas? <span> :) </span></p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/741081#741081">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in Snowdrop at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2082">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>