<!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;">
    JSR88 deployment to JBoss in AS 7.1.0 not working properly. (giving improper Deployment URL)
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/piy26">PIYUSH MUNDRA</a> in <i>JBoss AS 7 Development</i> - <a href="https://community.jboss.org/message/739065#739065">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hi,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I am trying to use <span style="text-align: left; background-color: #f8f4e6; text-indent: 0px; color: #555555;">JSR88 deployment to JBoss as per the instructions provided in <a class="" href="https://community.jboss.org/wiki/JSR88Client/diff?secondVersionNumber=16&amp;_sscc=t">https://community.jboss.org/wiki/JSR88Client/diff?secondVersionNumber=16&amp;_sscc=t</a></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="text-align: left; background-color: #f8f4e6; text-indent: 0px; color: #555555;">I want to deploy a test.war file using JSR88 implementation provided by JBOSS.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="text-align: left; background-color: #f8f4e6; text-indent: 0px; color: #555555;">However, My test.war file gets uploaded at location as <strong>$JBOSS_HOME\standalone\data\content\d7\37f7368101b293d280c225326dd8774aa315c1\content</strong></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="text-align: left; background-color: #f8f4e6; text-indent: 0px; color: #555555;">but the war gets registered within standalone.xml as:</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="color: #ff0000;">&lt;deployments&gt;</span></p><p><span style="color: #ff0000;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;deployment name="file:/C:/Users/thisuser/AppData/Local/Temp/test.war" runtime-name="file:/C:/Users/thisuser/AppData/Local/Temp/test.war"&gt;</span></p><p><span style="color: #ff0000;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;content sha1="d737f7368101b293d280c225326dd8774aa315c1"/&gt;</span></p><p><span style="color: #ff0000;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/deployment&gt;</span></p><p><span style="color: #ff0000;">&lt;/deployments&gt;</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thus the context created for the deployed war is of form <span style="color: #ff0000;">/file:/C:/Users/thisuser/AppData/Local/Temp/test.war</span>.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I followed the code sample for AS 7 as mentioned in the above JBOSS WIKI link.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>While browsing through code from SVN for <span style="color: #0000ff;">org.jboss.as.ee.deployment.spi.DeploymentManagerImpl.java</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>private TargetModuleInfo createDeployment(InputStream moduleArchive, String moduleName)</p><p>{</p><p>&#160;&#160;&#160; ....</p><p>&#160;&#160;&#160; ....</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>line:470</p><p>&#160;&#160;&#160; <strong>String deploymentName = tmpFile.getParent() + File.separator + this.metaData.getDeploymentName();</strong><br/><strong>&#160;&#160;&#160; </strong></p><p><strong>&#160;&#160;&#160;&#160; File deployment = new File(deploymentName);</strong><br/><strong>&#160;&#160;&#160;&#160; if ((deployment.exists()) &amp;&amp; (!(deployment.delete())))</strong><br/><strong>&#160;&#160;&#160;&#160;&#160;&#160; throw new IOException(DeploymentMessages.MESSAGES.cannotDeleteExistingDeployment(deployment));</strong></p><p><strong>&#160;&#160;&#160; </strong></p><p><strong>&#160;&#160;&#160; tmpFile.renameTo(deployment);</strong><br/><strong>&#160;&#160;&#160; moduleInfo.setModuleID(deployment.toURI().toURL());</strong><br/><strong>&#160;&#160;&#160; return moduleInfo;</strong></p><p><strong>}</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>It seems that what is set in moduleInfo is not the actual name of the WAR but the entire temporary path at which it gets created at server during the process of deployment. </p><p>This results in the&#160; deployment name&#160; and runtime-name of the context to be a complete FILE URI rather that the actual context name.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Requesting to please comment on my observation. Is there anything within the process of JSR88 deployment that I am missing or am I missing any configuration ?</p><p>Is the code observation a cause of the problem ?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thanks in advance.</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/739065#739065">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss AS 7 Development at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>