Uninstalling the Application


Now, like all good things, our application's time in the limelight has to come to an end. It has served its purpose of entertaining and informing us and now we are ready to undeploy it. Let's see how to do that on JBoss.

Developer's Notebook 2-7. Going up, up, up


How do I do that?

If you deploy an application by placing it into the deploy directory, it stands to reason that undeploying should happen when you remove it from the deploy directory. Sure enough, that holds true. If you delete the quote.war file, JBoss notices this change and undeploys the application. You should get a notice such as this in the log:

     08:56:13,629 INFO  [TomcatDeployer] undeploy, ctxPath=/quote, warUrl=file:/     Users/samjr/jboss-4.0.2/server/default/tmp/deploy/tmp12813quote.war/ 

We've also provided an undeploy target that accomplishes this. As you can see, the build file is just deleting the file from the deploy directory:

     [quote]$ ant undeploy     Buildfile: build.xml     undeploy:          [echo] In undeploy        [delete] Deleting 1 files from /users/samjr/jboss-4.0.2/server/default/deploy     BUILD SUCCESSFUL 

And that's it; the application is gone! This was just a simple web application; we'll move on to a more complete J2EE application in the next chapter.



JBoss. A Developer's Notebook
JBoss: A Developers Notebook
ISBN: 0596100078
EAN: 2147483647
Year: 2003
Pages: 106

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net