Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-1327

hot deployment directory should not be tied to name and location of debug jar

    Details

    • Type: Feature Request
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 1.2.1.GA
    • Fix Version/s: 1.3.0.ALPHA
    • Component/s: Core
    • Labels:
      None
    • Environment:

      JDK 1.5, Ubuntu Linux 7.04, Jetty running under Maven 2

    • Affects:
      Compatibility/Configuration
    • Estimated Difficulty:
      Low

      Description

      The logic for determining the location of the hot deployable directory for Java classes currently relies on the location and name of the jboss-seam-debug jar file. While this may work when the jar file is placed in WEB-INF/lib, relative to the WEB-INF/dev directory, and named jboss-seam-debug.jar, it breaks down when it is loaded by the application server by a different means or has a different name.

      For instance, when running a Seam application using Jetty from within Maven 2, the location of the jar file is in the local repository.

      What I find particularly scary is the hard-coded string offsets:

      String hotDeployDirectory = path.substring( 9, path.length()-46 ) + "dev";

      To get a better understanding of the problem, I added some logging messages to capture the path resolver logic when jetty builds its classpath from the maven repository.

      META-INF/debug.xhtml detected at jar:file:/home/dallen/.m2/repository-public/jboss/seam/jboss-seam-debug/1.2.1.GA/jboss-seam-debug-1.2.1.GA.jar!/META-INF/debug.xhtml
      Hot deploy directory is /home/dallen/.m2/repository-public/jboss/seam/jboss-seam-debug/1.2.1.GA/jbossdev

      If I place the jboss-seam-debug-1.2.1.ga.jar file in the src/main/webapp/WEB-INF/lib directory, then things get a little bit better, but still not quite right.

      META-INF/debug.xhtml detected at jar:file:/home/dallen/projects/connoisseur/src/main/webapp/WEB-INF/lib/jboss-seam-debug-1.2.1.GA.jar!/META-INF/debug.xhtml
      Hot deploy directory is /home/dallen/projects/connoisseur/src/main/webapp/WEB-INF/lib/jbossdev

      What I propose is for the WEB-INF/dev directory to be loaded using the servlet context. That way, it will always be the directory that is most likely located in the project of the developer. Since this feature is intended strictly for development, this seams to make the most sense.

      I will provided a patch for both Seam 1.2.1.ga and the trunk.

        Gliffy Diagrams

          Attachments

          1. JBSEAM-1327_1.2.1.GA.txt
            1 kB
          2. JBSEAM-1327_trunk.txt
            3 kB
          3. JBSEAM-1327-1.txt
            1 kB
          4. JBSEAM-1327-take2-1.2.1.GA.txt
            1 kB
          5. JBSEAM-1327-take2-trunk.txt
            4 kB
          6. JBSEAM-1328.txt
            2 kB

            Activity

              People

              • Assignee:
                gavin.king Gavin King
                Reporter:
                dan.j.allen Dan Allen
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: