简体   繁体   English

带有热插拔代理的 Weblogic Server

[英]Weblogic Server with Hotswap agent

We are looking a free alternative for jRebel.我们正在寻找 jRebel 的免费替代品。 It seems hotswap agent is a free good alternative for jRebel.似乎热插拔代理是 jRebel 的免费替代品。 But I didn't sure about it supports weblogic server, is there anyone use hotswap agent with weblogic server and how?但我不确定它是否支持 weblogic 服务器,是否有人将热插拔代理与 weblogic 服务器一起使用以及如何?

DCEVM and HotswapAgent do not support Weblogic. DCEVM 和 HotswapAgent 不支持 Weblogic。 Maintainers are clear about that, it is mentioned in many issues: here , here andhere .维护者对此很清楚,在许多问题中都提到了这一点: hereherehere

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.因此,如果您正在寻找一种可以在 WLS 上完美开箱即用的解决方案,它是最新的并且支持最近的 java 版本,那么恐怕 DCEVM 不是一个。

But if your are ok with unsecure , hacky solution, then read on.但是,如果您对不安全hacky的解决方案感到满意,请继续阅读。

The first problem with dcevm and weblogic is to even get it running. dcevm 和 weblogic 的第一个问题是让它运行。 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.我使用 dcevm + HotswapAgent 测试了weblogic docker 映像,并且大多数 oraclejdk 和 dcevm 版本的组合在启动时会导致错误或其他 JVM/WLS 崩溃。 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.很久以前,维护人员说 oraclejdk 应该与 dcevm 一起工作,但我想这没有得到积极的支持/测试,只是巧合地在某些版本组合上工作。 Deep magic used by WLS doesn't help also. WLS 使用的深层魔法也无济于事。

But thanks to some comments I found WLS will start on these two:但感谢一些评论,我发现 WLS 将从这两个开始:

  • oraclejdk 1.8.0_05 + dcevm installer-light-jdk8u5.52.jar (25.5-b02-dcevmlight-58) oraclejdk 1.8.0_05 + dcevm 安装程序-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 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,覆盖图像中原来的 java /u01/jdk/
  • take linux_amd64_compiler2/product/libjvm.so from dcevm installer and put it in /u01/jdk/jre/lib/amd64/dcevm从 dcevm 安装程序中获取linux_amd64_compiler2/product/libjvm.so并将其放入/u01/jdk/jre/lib/amd64/dcevm
  • add -XXaltjvm=dcevm to weblogic commandline.-XXaltjvm=dcevm添加到 weblogic 命令行。
  • (optionally) to get HotswapAgent features: (可选)获取 HotswapAgent 功能:
    • add 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 commandline/u01/jdk/jre/lib/amd64/hotswap hotswap 中添加hotswap-agent-core.jarhotswap-agent.jar以及选项-javaagent:/u01/jdk/jre/lib/amd64/hotswap/hotswap-agent.jar命令行上的 jar
    • add hotswap-agent.properties to your war/ear/classpathhotswap-agent.properties添加到您的 war/ear/classpath

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.现在运行远程调试 session,通过添加新方法修改 class 并重新编译 - 标准热插拔不支持热插拔新方法,它仅在 dcevm 处于活动状态时才有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM