-
1. Re: Applications deployed using MainDeployer.deploy does not start when the server is restared
jaikiran Dec 16, 2009 2:26 AM (in response to splram)MainDeployer deploys the application to a temp location which gets deleted on server restarts.
Question - Why do you want to use the MainDeployer to deploy your applications? Why not just use the Ant script to place the application inthe deploy folder?
And which version of JBoss AS do you use?
-
2. Re: Applications deployed using MainDeployer.deploy does not start when the server is restared
splram Dec 16, 2009 4:22 AM (in response to jaikiran)I want to do a remote deployment using FTP i.e. FTP the war to a folder that is accessible by JBoss and invoke the MainDeployer.deploy method using ANT. If I FTP the WAR directly to the deploy folder, then as soon as JBoss sees the file in the deploy folder it will try to deploy it. The FTP task uploads the WAR in chunks so there will be errors from the hot deployment. BTW I am using JBoss 4.2.3 GA.
-
3. Re: Applications deployed using MainDeployer.deploy does not start when the server is restared
jaikiran Dec 16, 2009 4:56 AM (in response to splram)splram wrote:
If I FTP the WAR directly to the deploy folder, then as soon as JBoss sees the file in the deploy folder it will try to deploy it. The FTP task uploads the WAR in chunks so there will be errors from the hot deployment. BTW I am using JBoss 4.2.3 GA.
See Peter's reply here http://community.jboss.org/message/6231#6231 Specifically:
One possible solution is to copy birt.war to another location on the same partition as JBoss AS and then "move" the file to the deploy directory.
-
4. Re: Applications deployed using MainDeployer.deploy does not start when the server is restared
splram Dec 16, 2009 6:01 AM (in response to jaikiran)Well, if we have to do that from ANT? The WAR is uploaded to an FTP location, from there I need to move it to JBoss deploy folder. How do you suggest to do that? -
5. Re: Applications deployed using MainDeployer.deploy does not start when the server is restared
jaikiran Dec 16, 2009 7:17 AM (in response to splram)Using your existing Ant task for FTP, first copy the deployment to a dummy location. And then use the Ant "move" task http://ant.apache.org/manual/CoreTasks/move.html to move it to the deploy folder of AS -
6. Re: Applications deployed using MainDeployer.deploy does not start when the server is restared
splram Dec 21, 2009 7:20 AM (in response to jaikiran)I have achieved it in a different way, I disabled the ScanEnabled in jboss-service.xml, ftping the file to deploy folder and invoking the MainDeployer.deploy operation using ANT. This way the application gets deployed when using ANT task as well as the application is restarted after the JBoss server is restarted.
-
7. Re: Applications deployed using MainDeployer.deploy does not start when the server is restared
pennstater Dec 21, 2009 10:10 AM (in response to splram)Rammohan,
I am trying to achieve what you seem to have done. I too have the DeploymentScanner disabled and I am trying to use ANT to undeploy/deploy WAR files. I can successfully access the MainDeployer MBean, but am having issues actually undeploying specific WARS. The operation does not error, but nothing is logged in the JBoss console (running locally right now), nor is the WAR actually undeployed.
I think my problem is actually passing an argument/parameter to the "undeploy()" method of the MainDeployer MBean. Do you mind showing your ANT code that does this (either undeploy or deploy)?
Here are a few snippets of my ANT file...
<project name="ANT Deploy Script" default="jboss-refresh" basedir="." xmlns:jmx="antlib:org.apache.catalina.ant.jmx"> ... <target name="jboss-undeploy" if="jboss.home" description="Undeploy '${war.name}.war' from JBoss AS"> <jmx:open url="service:jmx:rmi://localhost/jndi/rmi://localhost:8185/jmxrmi"/> <jmx:invoke name="jboss.system:service=MainDeployer" operation="undeploy"> <arg value="file:${jboss.home}/deploy/WARs/${war.name}.war" type="java.lang.String"/> </jmx:invoke> </target> ... </project>
ANT runs successfully, but as I mentioned, nothing actually happens (the WAR file does not get undeployed). Any help you can provide would be greatly appreciated.
-
8. Re: Applications deployed using MainDeployer.deploy does not start when the server is restared
splram Dec 29, 2009 6:51 AM (in response to pennstater)Hi,
Sorry for the late response.
I see a difference in the way you and I are using JMX ant task, however, here is what I use to undeploy the application using JMX ant task, hope this will help.
<jmx serverURL="localhost">
<invoke target="jboss.system:service=MainDeployer" operation="undeploy"><parameter type="java.lang.String"
arg="file:${jboss.dir}/server/default/deploy/${webapp.war}"/>
</invoke>
</jmx>