[jbosstools-issues] [JBoss JIRA] (JBIDE-21857) Hot class reload doesn't work on OpenShift
Thomas Mäder (JIRA)
issues at jboss.org
Mon Nov 28 04:33:01 EST 2016
[ https://issues.jboss.org/browse/JBIDE-21857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13328620#comment-13328620 ]
Thomas Mäder edited comment on JBIDE-21857 at 11/28/16 4:32 AM:
----------------------------------------------------------------
Hi [~mlabuda]. When you have a change that you can't HCR, the jboss tooling offers to reload the module with the new version of the code. The user expectation now is that further simple changes (add a printf) would simply work. However, even though the original version of the class is now garbage, the VM never garbage collects it. So every time I now want to do a further simple change, the VM will reject it because the original version of the class is still in memory.
If you want to test this, you can do the following:
# Rename a private method in a class
# Observe: you get a dialog saying the HCR has failed and offering to reload the module
# Reload the module
# Now make a further change that is HCR-compatible (add a printf)
# Observe: the HCR works.
Before the fix, step #5 would have failed.
was (Author: tmader):
Hi [~mlabuda]. When you have a change that you can't HCR, the jboss tooling offers to reload the module with the new version of the code. The user expectation now is that further simple changes (add a printf) would simply work. However, even though the original version of the class is now garbage, the VM never garbage collects it. So every time I now want to do a further simple change, the VM will reject it because the original version of the class is still in memory.
If you want to test this, you can do the following:
1. Rename a private method in a class
2. Observe: you get a dialog saying the HCR has failed and offering to reload the module
3. Reload the module
4. Now make a further change that is HCR-compatible (add a printf)
5. Observe: the HCR works.
Before the fix, step #5 would have failed.
> Hot class reload doesn't work on OpenShift
> ------------------------------------------
>
> Key: JBIDE-21857
> URL: https://issues.jboss.org/browse/JBIDE-21857
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: openshift
> Affects Versions: 4.3.1.Beta2
> Reporter: Fred Bricon
> Assignee: Rob Stryker
> Fix For: 4.4.2.Final, 4.4.3.AM1, 4.5.0.AM1
>
> Attachments: HCRFailure.zip
>
>
> When enabling debug mode on an EAP server deployed on OpenShift, locally changing a class file will :
> - work sometimes when only the content of the method changed, but could fail in some other occasions with the Debugger saying the JDK is out of sync
> - will always fail if a method signature changed, the debugger saying JDK is out of sync
> Restarting the deployed module (with the .dodeploy flag) doesn't fixes the issue (as opposed to the same tweak ahen running on a local EAP server)
> This may be caused by running OpenJDK? Does it support the same level of debugging as Oracle JDK?
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jbosstools-issues
mailing list