Change a Method at Runtime via a Hot Swap Mechanism

Change a method at runtime via a hot swap mechanism

You can either use the open-source HotSpot VM or the commercial JRebel IDE plugin to easily achieve your goal (view comparison table here).

Is it possible to hot swap classes with new methods on Wildfly in IntelliJ?

After checking the JRebel website and its features, it seems that classic JVM Hot Swap only allows for changes in method bodies which I'm already able to do so it seems that the classic freeware approach can't go further.

Change a method at runtime via a hot swap mechanism

You can either use the open-source HotSpot VM or the commercial JRebel IDE plugin to easily achieve your goal (view comparison table here).

Code hot swapping in Erlang

Yes, hot swapping in erlang servers generally refers to this feature.
It is well explained in the stackoverflow question Achieving code swapping in Erlang’s gen_server, and also in this neat Erlang Generic Server tutorial or this little one.

The Erlang/OTP gen_server module provides a generic way to achieve hot swapping, by implementing a Module:code_change/3 function in the callback module.

This way, you can upgrade a servers code without shutting it down, or fall back to former implementation if something does not work as expected. In general, hot swap should be put in place using the generic release handler.



Related Topics



Leave a reply



Submit