-
1. Re: Undeploy exploded web app
j2ee_junkie Jun 7, 2006 12:39 PM (in response to nickdegraeve)Nick,
If ant just overwrites the changed files, I think deployer will see the difference, undeploy the application, then redeploy. So you do not have to delete entire directory.
cgriffith -
2. Re: Undeploy exploded web app
nickdegraeve Jun 8, 2006 4:11 AM (in response to nickdegraeve)Yes, but when you copy, files/dirs that aren't needed anymore, will not be deleted, they just remain. That's why I need to delete my entire app.war/ directory.
-
3. Re: Undeploy exploded web app
peterj Jun 12, 2006 11:47 AM (in response to nickdegraeve)Nick, you state that some jar files cannot be deleted. Is that because they are in use? If so, the most likely cause is that the app server is holding on to session information for sessions that have not yet timed out.
Try this. Set the session-timeout in web.xml to a low number, like 1. Then deploy the the web.xml file. This should cause JBoss to redeploy the app. Wait about 5 seconds (the default time used by hot-deploy, adjust if you changed that time), and then try deleting the directory. Try it by hand first, and if it works, it should be fairly simple to teach ant how to do this. -
4. Re: Undeploy exploded web app
nickdegraeve Jun 13, 2006 3:37 AM (in response to nickdegraeve)It doesn't seem to work.
I added<session-config> <session-timeout>1</session-timeout> </session-config>
to web.xml; the app was redeployed. I waited long enough to make it time out and then I tried to delete the dir: the JARs are still in use.
The web app is one for Web Start with in WEB-INF/lib jardiff.jar, jnlp.jar, jnlp-servlet.jar and one of mine. None of them can be deleted. -
5. Re: Undeploy exploded web app
j2ee_junkie Jun 13, 2006 9:12 AM (in response to nickdegraeve)Lets try to start over on this topic.
You have an exploded war. You want to be able to undeploy the applicaiton, make changes to the content of this war, then redeploy, correct?
However, you do not want to delete some jar's, correct? please explain why you can't just delete the old war directory. I am missing something about your environment that does not make sense, that is why I need you to explain this.
thanks, cgriffith -
6. Re: Undeploy exploded web app
peterj Jun 13, 2006 10:58 AM (in response to nickdegraeve)OK, let's try something else. Try undeploying your application via the undeploy method on the jboss.system:service=MainDeployer mbean. The undeploy method takes a URL, which you can find using the listDeployedURLs method in the jboss.deployment:flavor=URL,type=DeploymentScanner mbean. Do this manually using the jmx-console, and then see if you can delete the jar files. If that works, the above steps can be scripted in ant, though the script is a little more unusual.