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.