3 Replies Latest reply on Jul 13, 2009 4:02 PM by jeanluc

    jboss-seam-debug.jar and deleting an exploded EAR

    asookazian

      I get the following Windows error when I try to delete my foo.EAR while JBoss 4.2.x is running:



      cannot delete jboss-seam-debug.jar: it is being used by another person or program.

      After I shutdown JBoss, i can delete it.


      This is causing a problem when I run 'ant unexplode'.  Everytime I must shutdown JBoss first.  Any way around this (other than not packaging the debug.jar in my EAR)?

        • 1. Re: jboss-seam-debug.jar and deleting an exploded EAR
          jeanluc

          Possibly related to this JDK bug, still not fixed. On Windows, URLClassLoader locks the files it loaded classes from.

          • 2. Re: jboss-seam-debug.jar and deleting an exploded EAR
            asookazian

            thanks for the reply.  IIRC I didn't have this problem when I was using Oracle/BEA JRockit JVM...  can someone verify that?  and that bug is from JDK 1.4!?!?  I wonder if it's fixed in JDK 1.6??



            While a jar file is opened, a file descriptor to the file is maintained,
            so that the file does not have to be continually reopened.
            This is important for good performance of the JVM.

            Note that this is business as usual for Windows applications.
            You cannot replace any supporting files in a Windows application that are in
            use, by design.  An operation like replacing a dll typically requires a reboot
            on Windows.  You can make an argument for both ways of doing things, but
            Java certainly cannot change the way Windows works.

            I will likely close this as Will Not Fix.
            • 3. Re: jboss-seam-debug.jar and deleting an exploded EAR
              jeanluc

              From what I can see in the bug report, the problem is still there in Sun's JDK6.