Modifying the Deployed Application


Hot deployment allows you to rapidly deploy an application in JBoss by simply placing the application in the deploy directory. JBoss quickly sees the application and deploys it, but ideally you would like to be able to make changes to a live application without deployment delays, no matter how small.

How do I do that?

JBoss unpacks those pesky J2EE archives into the tmp/deploy directory. The names are slightly mangled, but you should see a directory whose name ends in quote.war. This directory contains the fully expanded contents of quote.war. Each time you redeploy your application JBoss removes the current temporary directory and replaces it with one of a slightly different name.


Note: If you need to check which version of your application is deployed, check the tmp/deploy directory. Whatever you see there is what JBoss currently has deployed.

You will see a temporary copy of everything you see in the lib and deploy directories. JBoss doesn't keep an open handle on any of the files in those directories. This is very important if your operating system keeps a lock on files while they are being read.


If you edit the quote.jsp file in the expanded quote.war directory, you will see the changes reflected the next time you access the application. That's all you have to do to test out a minor change to a live web application.

You can update JSPs and static web content, but unfortunately you can't update the deployment descriptors. You'll have to redeploy the entire application to pick up a change to them.

What about...

...the compiled JSPs?

If you run into a problem where you need to see the compiled JSPs, look in the work/jboss.web/localhost/directory. The generated Java code is available in a subdirectory named after the context the web application serves.



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