Eclipse Hot Code Replace Fail - republish web application
Asked Answered
P

3

6

I use the Hot Swap java debugging feature with web app on Tomcat. After some class signature change, I got "Hot Code Replace Fail" Eclipse dialog - I understand that.

What I want in such case is to republish the application (I can do that) and work with the newly deployed code. However the debugger stil complains, until I restart the server. Because other apps and long startup I don't want that.

Is there a way how to tell to the debugger, that there is the new class version already reloaded in a new webapp classloader and that it is save to continue?

Thanks.

Pomade answered 31/8, 2010 at 16:6 Comment(0)
A
2

Why don't you try with JRebel? JRebel is a JVM Java Agent that integrates with application servers, making classes reloadable with existing class loaders. Only changed classes are recompiled and instantly reloaded in the running application. JRebel plugs into IDEs and build systems. Classes and static resources are loaded straight from the workspace. http://zeroturnaround.com/software/jrebel/

Regards, Andrea

Adorno answered 19/2, 2015 at 9:59 Comment(0)
A
0

There is a old PHD project. The guy who made it was brought by Oracle but his work didnt made it to the Java 8 and hopefully will be seen in Java 9 but is more likely to be in Java 10. There is a new Version of this for Java 8 I guess. I havent tried it yet.

My Original Question for additional information: Advanced Code Hot Swapping in JDK 8?

And the Project page on Github: https://github.com/dcevm/dcevm

With this you can hot replace almost any class change freeing you from restarting the JDK ever after. (beside sideeffects for static objets and singletons but that would be logical)

Attalie answered 20/2, 2015 at 18:9 Comment(0)
A
0

Did you try Server Options - Serve modules without publishing along with Publishing?

Server Options
Publishing

Also not sure what you are saying about other apps.

Accompany answered 20/2, 2015 at 23:36 Comment(3)
you're correct: in this is the screen you can change a parameter to automatically reflect changes in server without restarting but it's not the one you said. It's in the publishing section, changing from never publish to automatically publish when resources changeKicker
Please note option "Serve modules without publishing"Accompany
I though this was only for resources inside WebContent folder, not for java classesKicker

© 2022 - 2024 — McMap. All rights reserved.