熱部署,tomcat熱部署

來源:互聯網
上載者:User

熱部署,tomcat熱部署
1.          熱部署的含義

所謂熱部署,就是在應用正在啟動並執行時候升級軟體,卻不需要重新啟動應用。

對於Java應用程式來說,熱部署就是在運行時更新Java類檔案。在基於Java的應用伺服器實現熱部署的過程中,類裝入器扮演著重要的角色。大多數基於Java的應用伺服器,包括EJB伺服器和Servlet容器,都支援熱部署。類裝入器不能重新裝入一個已經裝入的類,但只要使用一個新的類裝入器執行個體,就可以將類再次裝入一個正在啟動並執行應用程式。

2.          Tomcat的熱部署

1)        下載myeclipse中tomcat-link外掛程式

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

D:\program files\Genuitec\Common\plugins

3)        開啟D:\program files\Genuitec\MyEclipse8.5\configuration\org.eclipse.equinox.simpleconfigurator\bundles.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:\JRebel\jrebel.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]


tomcat 熱部署

在你建立的server會有一個server檔案件把conf檔案下的server.mxl 標籤Host autoDeploy="true" 見圖片!



 
tomcat 熱部署

在你建立的server會有一個server檔案件把conf檔案下的server.mxl 標籤Host autoDeploy="true" 見圖片!



 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.