]
Martin Malina closed JBIDE-19821.
---------------------------------
Closing this issue. Feel free to reopen if needed.
Hot code swap not happening for Web App Libraries before being
loaded
---------------------------------------------------------------------
Key: JBIDE-19821
URL:
https://issues.jboss.org/browse/JBIDE-19821
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: server
Affects Versions: 4.2.3.Final
Environment: Windows 7, 64 bits, Eclipse Luna (4.4.2), JBoss Tools 4.2 Plug-ins
installed: JBoss WebServices Tools (1.7.3.Final), JBossAS Tools (3.0.3.Final), Jboss
JAX-RS Tools (1.7.3.Final)
Reporter: Stephane Sandron
Assignee: Rob Stryker
Fix For: 4.3.0.CR1
Attachments: classloading_issue.zip
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.