4 Replies Latest reply on Sep 10, 2002 6:43 PM by juha

    Help!  War file is redeployed every time I restart JBoss

    arbie

      I'm running jboss-3.0.0_tomcat-4.0.3 on Windows NT. I have an ear that contains a war and ejb. Everyting is running fine. However, every time I restart jboss, the war is redeployed into c:/temp/nested-xxx.war, and the jars are redeployed into c:/temp/nested-xxx.jar. If I stop and restart jboss, the old war and jars aren't cleaned up, but a new version is created. I've completely filled my c drive twice in the last week.

      Why is the war file deployed every time, instead of using the existing version? I've added the attribute DeleteWorkDirs to my tomcat-service.xml, but that didn't make any difference (I've tried with the value set to both true and false). Below is my tomcat4-service.xml file, in case I put the attribute in the wrong place.


      <?xml version="1.0" encoding="UTF-8"?>
      <!-- Set catalina.home to the location of the Tomcat-4.x dist.
      The default value is that of the JBoss/Catalina bundle where the
      jakarta-tomcat-4.0.3-LE-jdk14 is included as jboss_dist/catalina
      -->
      <!DOCTYPE server [
      <!ENTITY catalina.home "../catalina">
      ]>

      <!-- The service configuration for the embedded Tomcat4 web container
      -->









      &catalina.home;




      false







      <!-- A HTTP Connector on port 8080 -->







        • 1. Re: Help!  War file is redeployed every time I restart JBoss

          It's a workaround for the brain dead file locking in windows (a copy of the ear is created every time it is deployed). I don't know why it is not cleaning up temp files, if they're created as such, windows should be able to handle them on its own.

          • 2. Re: Help!  War file is redeployed every time I restart JBoss
            arbie

            I've never heard of Windows automatically deleting temp files. I thought this was left up to the program. How is Windows supposed to know when a file/folder is no longer needed?
            Is there a way to not have the war deployed every time? If the war hasn't changed, there is no reason to redeploy (except of course that temp files are used, and there is no guarantee that they are still there).

            • 3. Re: Help!  War file is redeployed every time I restart JBoss

              > I've never heard of Windows automatically deleting
              > temp files. I thought this was left up to the
              > program. How is Windows supposed to know when a
              > file/folder is no longer needed?

              When the process that created the temp file exits? I don't know, I don't design Windows.

              > Is there a way to not have the war deployed every
              > time?

              What you mean? If the server is restarted and your ear is in deploy directory, it is deployed.

              • 4. Re: Help!  War file is redeployed every time I restart JBoss

                hmm, maybe we're missing the deleteOnExit() call somewhere, dunno, have to look