Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-19821

Hot code swap not happening for Web App Libraries before being loaded

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 4.3.0.CR1
    • 4.2.3.Final
    • server
    • None
    • Hide
      • Using Eclipse, create a new "Simple Web Service" project named "TestIde"
      • Create a new Java project named "TestIdeModule"
      • Add TestIdeModule to the build path of TestIde
      • Modify the "Deployment Assembly" of TestIde to add the Java project as a module with the deploy path "WEB-INF/lib/TestIdeModule.jar"
      • Create a simple class in TestIde with a single method returning a string (WebAppClass)
      • Create a simple class in TestIdeModule with single method returning a string (ModuleClass)
      • Modify HelloWorld in TestIde to instantiate one of those 2 classes depending on the argument passed in the web service request
      • Deploy the web application
      • Modify the 2 classes (WebAppClass and ModuleClass): to change the string returned
      • Send web service requests
      • The string returned by WebAppClass will be the latest one; the string returned by ModuleClass will be the original one (and not the latest one, after the modification)
      Show
      Using Eclipse, create a new "Simple Web Service" project named "TestIde" Create a new Java project named "TestIdeModule" Add TestIdeModule to the build path of TestIde Modify the "Deployment Assembly" of TestIde to add the Java project as a module with the deploy path "WEB-INF/lib/TestIdeModule.jar" Create a simple class in TestIde with a single method returning a string (WebAppClass) Create a simple class in TestIdeModule with single method returning a string (ModuleClass) Modify HelloWorld in TestIde to instantiate one of those 2 classes depending on the argument passed in the web service request Deploy the web application Modify the 2 classes (WebAppClass and ModuleClass): to change the string returned Send web service requests The string returned by WebAppClass will be the latest one; the string returned by ModuleClass will be the original one (and not the latest one, after the modification)

    Description

      I have created 2 projects in Eclipse:

      • TestIde: a web application with 2 classes
        • HelloWorld: a web service endpoint with a single web service method
        • WebAppClass: a simple Java class with a single method returning a string
      • TestIdeModule: a regular java module (with the "Utility Module" facet defined in Eclipse for the project) with a single class
        • ModuleClass: similar to WebAppClass

      TestIde has

      • TestIdeModule in its build path
      • TestIdeModule deployed in WEB-INF/lib/TestIdeModule.jar

      The code of the web service method takes a string and depending on this it will instantiate WebAppClass or ModuleClass.

      I am running WildFly 8.1 (in debug mode) with -verbose:class to see the classes being loaded/redefined.

      My issue is the following:

      • Starting WildFly in debug mode
      • Modifying the string returned by ModuleClass in my IDE (before it is loaded)
      • The resulting string is still the previous one (before my modification in my IDE)

      If I do the same test with the WebAppClass, everything is OK because it is deployed as a .class in WEB-INF/classes

      The change does not take effect right away over the debug wire when:

      • The modified class is part of a Java project deployed as a JAR in WEB-INF/lib
      • The modified class has not yet been loaded

      When the class is loaded before being modified, everything is fine.

      When I check "Force module restart on following regex pattern" and using the pattern: "\.jar$", I see WildFly republishing a JAR with the modified file inside. The problem is still occurring though. It seems that it does not take into account the modification if the class has never been loaded.

      Attachments

        Activity

          People

            rob.stryker Rob Stryker (Inactive)
            ssandron Stephane Sandron (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: