We are looking a free alternative for jRebel. It seems hotswap agent is a free good alternative for jRebel. But I didn't sure about it supports weblogic server , is there anyone use hotswap agent with weblogic server and how?
DCEVM and HotswapAgent do not support Weblogic. Maintainers are clear about that, it is mentioned in many issues: here, here and here.
So if you are looking for a solution that will flawlessly work out of the box on WLS, is up-to-date and supported for recent java versions, then I'm afraid DCEVM is not one.
But if your are ok with unsecure, hacky solution, then read on.
The first problem with dcevm and weblogic is to even get it running. I tested weblogic docker image with dcevm + HotswapAgent and most combinations of oraclejdk and dcevm versions cause error or other JVM/WLS crash on startup. Long time ago the maintainers said oraclejdk should work with dcevm, but I guess this is not actively supported/tested and just works by coincidence on some combination of versions. Deep magic used by WLS doesn't help also.
But thanks to some comments I found WLS will start on these two:
NOTE: These versions are ancient and probably have lots of security vulnerabilities, use at your own risk.
procedure:
/u01/jdk/
in the image,linux_amd64_compiler2/product/libjvm.so
from dcevm installer and put it in /u01/jdk/jre/lib/amd64/dcevm
-XXaltjvm=dcevm
to weblogic commandline.hotswap-agent-core.jar
or hotswap-agent.jar
in /u01/jdk/jre/lib/amd64/hotswap
together with option -javaagent:/u01/jdk/jre/lib/amd64/hotswap/hotswap-agent.jar
on wls commandlinehotswap-agent.properties
to your war/ear/classpathNow run a remote debugging session, modify a class by adding a new method and recompile - hotswapping new method is not supported by standard hotswap, it will only work when dcevm is active.