Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-969

EJB3Deployer locking jars in deploy dir

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • AS 4.2.1.GA, AS 5.0.0.Beta3
    • AS 4.2.0 GA
    • None
    • None

      In chasing down JBPAPP-171 I found that JBoss' deployment process tends to lock files in the deploy dir on Windows. (The farm dir as well, which is just a specialized form of deploy dir.)

      Traced it down to the EJB3Deployer.accepts() functionality, particularly the hasEjbAnnotation() method. The first line in that method

      Iterator it = ArchiveBrowser.getBrowser(di.url, new ClassFileFilter());

      is causing the original jar in deploy to be scanned for annotations, rather than the copy in the server/.../tmp dir. That scan results in Windows filesystem locks on the deploy dir jar. Not always but seems like roughly 1/2 the time.

      Changing that line to the following made the problem go away:

      Iterator it = ArchiveBrowser.getBrowser(di.localUrl, new ClassFileFilter());

      di.localUrl points to the tmp dir copy of the deployment.

              rhn-engineering-cdewolf Carlo de Wolf
              bstansbe@redhat.com Brian Stansberry
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: