3 Replies Latest reply on Mar 5, 2003 10:17 AM by jova73

    Undeployment upon Shutdown

    fastwilli

      I am installing a web application that keeps settings stored inside the web application. These settings may be updated dynamically. They can then be stored in the web application structure (or somewhere else). These settings files are located in the web application to make the deployment of the app easier. This way you don't have to worry about some outside directory existing. You know the directory exists because you provide it in the web application.

      When I deploy this application using a war file by placing it in the deploy directory, it deploys perfectly. However, when JBoss shuts down (or something bad happens) the web app is undeployed and all the changes to any files in the web app are lost.

      Is there a good way to prevent this. I thought maybe I could write a new deployer or something but I would prefer not to if there is a solution already available.

      Please advise and thank you for your help.

        • 1. Re: Undeployment upon Shutdown

          If you deploy as a war archive, JBoss copies it
          to a temporary directory. This is then deleted at
          undeployment.

          You can make a directory structure that looks like
          a war in the deploy directory. From JBoss2.4.4 this
          is deployed as is, so your changes won't get deleted
          at undeployment.

          Regards,
          Adrian

          • 2. Re: Undeployment upon Shutdown
            fastwilli

            Thanks for the reply. I actually tried this, and it didn't work. It throws a 500 error. But then I did a search and found you need to have .war as an extension to your directory you deploy it in.

            For instance if you want to deploy an application to http://localhost:8080/blah/

            then you need a blah.war directory in your deploy directory rather than a blah directory.

            Thanks again, your reply was key in getting this to work for me.

            • 3. Re: Undeployment upon Shutdown
              jova73

              I've a similar problem: when my app is undeployed the temporary folder is not deleted and after a few days it is full of neste*.jar, ... (tmp on an AIX machine).

              Any idea about the reason those files are not cleared?

              Thanks in advance,
              Andrea