是否可以进行ATG类的热交换 [英] Is it possible to do Hotswapping of ATG classes

查看:107
本文介绍了是否可以进行ATG类的热交换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们遵循的部署是我们使用runAssembler.bat来构建ear文件并将其部署在应用服务器中.我们将weblogic和jboss用于测试所构建模块的目的.但是,对于每一个小的更改,我们都需要运行runAssembler并构建一个新的耳朵,并将其部署在应用服务器中,然后重新启动服务器.

The deployment we follow is that we use runAssembler.bat to build an ear file and deploy it in a app server. We are using weblogic and jboss for testing purposes of the modules we built. However for every small change, we need to run runAssembler and build a new ear and deploy it in app server and restart the server.

我想找出是否有人想出一种方法来对类文件进行热交换,这些类文件是由我们在weblogic或jboss中的ATG环境中编写的代码生成的.

I would like to find out if anyone figured out a way to do Hotswapping of class files which are generated by the code we write in ATG environment in either weblogic or jboss.

推荐答案

通过在调试端口上将IDE附加到应用程序服务器,通常可以进行热交换. 此处此处.有一些信息.

By attaching your IDE to your Application server on the Debug port it is generally possible to do hotswapping. Setting this up on Eclipse and JBoss is documented here, here and here. There is some information for setting it up in WebLogic here.

连接调试器,编辑Java文件,单击保存",并在IDE中进行热代码替换,它现在应该更新正在运行的类文件.在Eclipse中,如果无法进行同步,通常会弹出一个对话框.如果您使用的是Eclipse,请确保已勾选项目下的自动构建"标志,否则您将永远等待.我没有通过JBOSS(爆炸性的ATG EAR)执行此操作的任何问题,也没有在WebSphere 7上成功执行此操作的变数.确保您用于编译构建的相同JAVAC是加载到IDE中的JAVAC也是谨慎的做法编译路径.

Attach your debugger, edit the java file, click 'save' and with hot code replacement in your IDE it should now update the running class file. In Eclipse it usually gives a popup if it was unable to do the sync. If you are using Eclipse, make sure the 'Build Automatically' flag under projects is ticked or you'll be waiting forever. I've not had any issues doing this via JBOSS (exploded ATG EAR) and variable success in doing this on WebSphere 7. It may also be prudent to make sure the same JAVAC you use to compile your build is the one loaded into your IDE compile path.

另一种至少减少构建/部署时间的方法是部署一个解压缩/爆炸的EAR,然后简单地复制您的类文件(您可以使用Eclipse

Another way to at least reduce the build/deploy time would be to deploy an unpacked/exploded EAR and simply copy your class files across (you could use the Eclipse FileSync plugin) and restart the server.

还有一些商业选项,例如 JRebel

There are also some commercial options available, like JRebel

这篇关于是否可以进行ATG类的热交换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆