简体   繁体   English

如何在不使用IDE的情况下进行HotSwapping?

[英]How to do HotSwapping without using IDE?

I've used DCEVM hotswap technology in eclipse and IntelliJ IDE which was pretty cool feature. 我在eclipse和IntelliJ IDE中使用了DCEVM hotswap技术,这是非常酷的功能。 By using DCEVM in IDE what I can do is, I can change into the source code ie add/remove/edit method, classes, properties at the runtime without doing restart the program. 通过在IDE中使用DCEVM,我可以做的是,我可以更改为源代码,即在运行时添加/删除/编辑方法,类,属性而无需重新启动程序。

Now my question is: I want to apply the same features in my running application which is run without using any IDE. 现在我的问题是:我想在运行的应用程序中应用相同的功能,这些功能在不使用任何IDE的情况下运行。 To be more specific the running applications source code(compiled code) can change on the fly. 更具体地说,正在运行的应用程序源代码(编译代码)可以随时更改。 And for that bytecode how to deploy on DCEVM for runtime hotswapping? 对于该字节码,如何在DCEVM上部署以进行运行时hotswapping?

What I've found is: We can do hotSwapping without using IDE for that we can write own JNI code to directly hook into JVMTI and trigger a hotswap. 我发现的是:我们可以在不使用IDE的情况下进行hotSwapping,因为我们可以编写自己的JNI代码直接挂钩到JVMTI并触发hotswap。

any idea/help would be much helpfull. 任何想法/帮助都会有所帮助。 thanks 谢谢

Fortunately I found the solution.We can use the HotSwapper plugin to solve this kind of problem. 幸运的是我找到了解决方案。我们可以使用HotSwapper插件来解决这类问题。 The same question is asked in dcevm discussion forume: 在dcevm讨论中询问同样的问题:

https://groups.google.com/forum/#!topic/hotswapagent/Uk3cUdkHNYQ https://groups.google.com/forum/#!topic/hotswapagent/Uk3cUdkHNYQ

Although the information from this link https://news.ycombinator.com/item?id=3198497 is very helpfull but it was asked four years ago, so that I was stuck in. 虽然来自这个链接的信息https://news.ycombinator.com/item?id=3198497非常有帮助但四年前就被问过,所以我被困在了。

Now the DCEVM is being more smart It can support various plugin such as Hotswapper, AnonymousClassPatch, WatchResources, Hibernate, Spring, Jersey2, Jetty, Tomcat, ZK, Logback, JSF, Seam, ELResolver, OsgiEquinox and even we can write own plugin too which is more easy to develope. 现在DCEVM更加智能它可以支持各种插件,如Hotswapper,AnonymousClassPatch,WatchResources,Hibernate,Spring,Jersey2,Jetty,Tomcat,ZK,Logback,JSF,Seam,ELResolver,OsgiEquinox甚至我们也可以编写自己的插件更容易开发。

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

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