热部署

1.          热部署的含义

所谓热部署,就是在应用正在运行的时候升级软件,却不需要重新启动应用。

对于Java应用程序来说,热部署就是在运行时更新Java类文件。在基于Java的应用服务器实现热部署的过程中,类装入器扮演着重要的角色。大多数基于Java的应用服务器,包括EJB服务器和Servlet容器,都支持热部署。类装入器不能重新装入一个已经装入的类,但只要使用一个新的类装入器实例,就可以将类再次装入一个正在运行的应用程序。

2.          Tomcat的热部署

1)        下载myeclipse中tomcat-link插件

2)        将com.sysdeo.eclipse.tomcat_3.3.0放到

D:program filesGenuitecCommonplugins

3)        打开D:program filesGenuitecMyEclipse8.5configurationorg.eclipse.equinox.simpleconfiguratorbundles.info文件,在最后加上

com.sysdeo.eclipse.tomcat,3.3.0,file:/D:/programfiles/Genuitec/Common/plugins/com.sysdeo.eclipse.tomcat_3.3.0/,4,false

4)        重启MyEclipse 8.5就会发现MyEclipse中多了如下几个图标

.

5)        配置tomcat的home目录

6)        配置tomcat 中jvm的参数

-javaagent:D:JRebeljrebel.jar  指向你电脑jrebel.jar存放的路径

-Drebel.spring_plugin=true   支持spring框架

-Drebel.aspectj_plugin=true   支持aspectj

-Drebel.struts2_plugin=true   支持struts2

-Drebel.hibernate_plugin=true 支持hibernate

-noverify

7)        启动Tomcat,会发现如下日志,说明热部署成功了:

[2014-11-01 21:55:28]

[2014-11-01 21:55:28]#############################################################

[2014-11-01 21:55:28]

[2014-11-01 21:55:28]  JRebel 5.0.0 (201206080930)

[2014-11-01 21:55:28]  (c) Copyright ZeroTurnaround OU, Estonia,Tartu.

[2014-11-01 21:55:28]

[2014-11-01 21:55:28]  Over the last 1 days JRebel prevented

[2014-11-01 21:55:28]  at least 0 redeploys/restarts saving youabout 0 hours.

[2014-11-01 21:55:28]

[2014-11-01 21:55:28]  This product is licensed to Unlimited

[2014-11-01 21:55:28]  For FUN! Unlimited! Enjoy!

[2014-11-01 21:55:28]

[2014-11-01 21:55:28]  The following plugins are disabled at themoment:

[2014-11-01 21:55:28]  * Apache MyFaces plugin (set-Drebel.myfaces_plugin=true to enable)

[2014-11-01 21:55:28]  * Click plugin (set -Drebel.click_plugin=trueto enable)

[2014-11-01 21:55:28]  * JRuby Plugin (set -Drebel.jruby_plugin=trueto enable)

[2014-11-01 21:55:28]  * Jersey plugin (set-Drebel.jersey_plugin=true to enable)

[2014-11-01 21:55:28]  * Oracle ADF Core plugin (set-Drebel.adf_core_plugin=true to enable)

[2014-11-01 21:55:28]  * Oracle ADF Faces plugin (set -Drebel.adf_faces_plugin=trueto enable)

[2014-11-01 21:55:28]  * Seam-Wicket plugin (set-Drebel.seam_wicket_plugin=true to enable)

[2014-11-01 21:55:28]  * WebObjects plugin (set-Drebel.webobjects_plugin=true to enable)

[2014-11-01 21:55:28]

[2014-11-01 21:55:28]#############################################################

[2014-11-01 21:55:28]

文章知识点与官方知识档案匹配,可进一步学习相关知识Java技能树首页概览93679 人正在系统学习中

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2014年10月1日
下一篇 2014年10月1日

相关推荐