Weblogic Server with Hotswap agent
Solution 1:
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:
- oraclejdk 1.8.0_05 + dcevm installer-light-jdk8u5.52.jar (25.5-b02-dcevmlight-58)
- oraclejdk 1.8.0_25 + dcevm DCEVM-light-8u45-installer.jar (25.45-b02-dcevmlight-15
NOTE: These versions are ancient and probably have lots of security vulnerabilities, use at your own risk.
procedure:
- overwrite original java
/u01/jdk/
in the image, - take
linux_amd64_compiler2/product/libjvm.so
from dcevm installer and put it in/u01/jdk/jre/lib/amd64/dcevm
- add
-XXaltjvm=dcevm
to weblogic commandline. - (optionally) to get HotswapAgent features:
- add
hotswap-agent-core.jar
orhotswap-agent.jar
in/u01/jdk/jre/lib/amd64/hotswap
together with option-javaagent:/u01/jdk/jre/lib/amd64/hotswap/hotswap-agent.jar
on wls commandline - add
hotswap-agent.properties
to your war/ear/classpath - see also https://github.com/HotswapProjects/HotswapAgent/pull/418
- add
Now 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.