I have made a small maven based web application in VSCode and trying to deploy it on JBoss using the Redhat Server Connector Extension.
But the hot deployment of the class files does not work in simple running JBoss server.
But Hot deployment does work in debug mode as 'Hot Code Replace' by setting the property 'java.debug.settings.hotCodeReplace' to 'auto'.
My inputs are from below links:
and other SO links like: How do I get Java "hot code replacement" working in JBoss?
Hot deploy on JBoss - how do I make JBoss "see" the change?
But it couldn't help.
Can you suggest something more about how it is simply possible in running JBoss?
(PS: Auto Build feature in VSCode is already enabled.
And It works fine in eclipse).
Hot deployment of web applications in VSCode's integrated RedHat Server connector can occur in following ways:
Exploded war folder
: A folder is extracted from the original war and deployed to JBoss using the Exploded option. Here, the static changes like change in jsps and HTML are automatically reflected in the running application.
Hot code Replacement
: Hot code replacement (HCR) is a fast debugging technique in which the Java debugger transmits new class files over the debugging
channel to another JVM.
HCR only works when the class signature does not change; you cannot remove or add fields to existing classes when using HCR. However, HCR can be used to change the body of a method.
(source: https://devblogs.microsoft.com/visualstudio/hot-code-replacement-for-java-comes-to-visual-studio-code/)
Maven Install/build
: It is actually not a preferred technique which someone will want but it is useful also. In this technique, you run maven: install
which builds the project again and install it onto the server again.
Currently, VSCode for java and the server connector extension are new as compared to already available IDEs like Eclipse. So, we might expect more powerful functionality in coming future.