[jboss-dev-forums] [JBoss AS 7 Development] - JSR88 deployment to JBoss in AS 7.1.0 not working properly. (giving improper Deployment URL)
PIYUSH MUNDRA
do-not-reply at jboss.com
Thu May 31 11:08:45 EDT 2012
PIYUSH MUNDRA [https://community.jboss.org/people/piy26] created the discussion
"JSR88 deployment to JBoss in AS 7.1.0 not working properly. (giving improper Deployment URL)"
To view the discussion, visit: https://community.jboss.org/message/739065#739065
--------------------------------------------------------------
Hi,
I am trying to use JSR88 deployment to JBoss as per the instructions provided in https://community.jboss.org/wiki/JSR88Client/diff?secondVersionNumber=16&_sscc=t
I want to deploy a test.war file using JSR88 implementation provided by JBOSS.
However, My test.war file gets uploaded at location as *$JBOSS_HOME\standalone\data\content\d7\37f7368101b293d280c225326dd8774aa315c1\content*
but the war gets registered within standalone.xml as:
<deployments>
<deployment name="file:/C:/Users/thisuser/AppData/Local/Temp/test.war" runtime-name="file:/C:/Users/thisuser/AppData/Local/Temp/test.war">
<content sha1="d737f7368101b293d280c225326dd8774aa315c1"/>
</deployment>
</deployments>
Thus the context created for the deployed war is of form /file:/C:/Users/thisuser/AppData/Local/Temp/test.war.
I followed the code sample for AS 7 as mentioned in the above JBOSS WIKI link.
While browsing through code from SVN for org.jboss.as.ee.deployment.spi.DeploymentManagerImpl.java
private TargetModuleInfo createDeployment(InputStream moduleArchive, String moduleName)
{
....
....
line:470
*String deploymentName = tmpFile.getParent() + File.separator + this.metaData.getDeploymentName();*
* *
* File deployment = new File(deploymentName);*
* if ((deployment.exists()) && (!(deployment.delete())))*
* throw new IOException(DeploymentMessages.MESSAGES.cannotDeleteExistingDeployment(deployment));*
* *
* tmpFile.renameTo(deployment);*
* moduleInfo.setModuleID(deployment.toURI().toURL());*
* return moduleInfo;*
*}*
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.
This results in the deployment name and runtime-name of the context to be a complete FILE URI rather that the actual context name.
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 ?
Is the code observation a cause of the problem ?
Thanks in advance.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/739065#739065]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20120531/20d1392f/attachment.html
More information about the jboss-dev-forums
mailing list