tomcat antiResourceLocking antiJARLocking 的作用和用法
更新時間:2009年08月01日 13:55:51 作者:
tomcat 里 antiResourceLocking 和 antiJARLocking 的作用和用法
我們先來看看這個 antiResourceLocking 到底是干什么的!
If true, Tomcat will prevent any file locking. This will significantly impact startup time of applications, but allows full webapp hot deploy and undeploy on platforms or configurations where file locking can occur. If not specified, the default value is false.
Please note that setting this to true has some side effects, including the disabling of JSP reloading in a running server: see Bugzilla 37668.
Please note that setting this flag to true in applications that are outside the appBase for the Host (the webapps directory by default) will cause the application to be deleted on Tomcat shutdown. You probably don't want to do this, so think twice before setting antiResourceLocking=true on a webapp that's outside the appBase for its Host.
我大致翻譯一下:
如果這個參數(shù)為true,那么將組織任何文件鎖。這將明顯的影響應(yīng)用的啟動時間,但允許webapps,可能發(fā)生鎖的平臺和配置下,支持完整的熱部署和熱卸載。如果不配置,默認(rèn)值是false;
如果設(shè)置為true,有一些副作用,包括屏蔽了JSP文件在運(yùn)行服務(wù)器上的重新加載。
如果設(shè)置為true,且部署在Host的AppBase目錄外面(默認(rèn)是webapps),在Tomcat關(guān)閉的時候?qū)?dǎo)致應(yīng)用被刪除。
最主要的就翻譯到這里了。實(shí)際上,如果為false,因?yàn)榇嬖阪i,在你重新發(fā)布的時候,可能出現(xiàn)部分代碼無法更新。因?yàn)樵嘉募赡芤驗(yàn)楸绘i住了,不能刪除。
當(dāng)然,如果為false,那么部署的目錄就是和包名相同了。如果是false,則會每次都放到一個臨時目錄下面,一個temp目錄。這也是這個配置引發(fā)的一個副作用。
另外的一個類似的配置 antiJARLocking 是防止jar類庫被鎖定而無法刪除這個作用的。
If true, Tomcat will prevent any file locking. This will significantly impact startup time of applications, but allows full webapp hot deploy and undeploy on platforms or configurations where file locking can occur. If not specified, the default value is false.
Please note that setting this to true has some side effects, including the disabling of JSP reloading in a running server: see Bugzilla 37668.
Please note that setting this flag to true in applications that are outside the appBase for the Host (the webapps directory by default) will cause the application to be deleted on Tomcat shutdown. You probably don't want to do this, so think twice before setting antiResourceLocking=true on a webapp that's outside the appBase for its Host.
我大致翻譯一下:
如果這個參數(shù)為true,那么將組織任何文件鎖。這將明顯的影響應(yīng)用的啟動時間,但允許webapps,可能發(fā)生鎖的平臺和配置下,支持完整的熱部署和熱卸載。如果不配置,默認(rèn)值是false;
如果設(shè)置為true,有一些副作用,包括屏蔽了JSP文件在運(yùn)行服務(wù)器上的重新加載。
如果設(shè)置為true,且部署在Host的AppBase目錄外面(默認(rèn)是webapps),在Tomcat關(guān)閉的時候?qū)?dǎo)致應(yīng)用被刪除。
最主要的就翻譯到這里了。實(shí)際上,如果為false,因?yàn)榇嬖阪i,在你重新發(fā)布的時候,可能出現(xiàn)部分代碼無法更新。因?yàn)樵嘉募赡芤驗(yàn)楸绘i住了,不能刪除。
當(dāng)然,如果為false,那么部署的目錄就是和包名相同了。如果是false,則會每次都放到一個臨時目錄下面,一個temp目錄。這也是這個配置引發(fā)的一個副作用。
另外的一個類似的配置 antiJARLocking 是防止jar類庫被鎖定而無法刪除這個作用的。
相關(guān)文章
idea配置Tomcat Deployment添加時沒有Artifact的問題及解決
這篇文章主要介紹了idea配置Tomcat Deployment添加時沒有Artifact的問題及解決方案,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教2023-07-07
tomcat部署項(xiàng)目以及與IDEA集成的實(shí)現(xiàn)
這篇文章主要介紹了tomcat部署項(xiàng)目以及與IDEA集成的實(shí)現(xiàn),文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2021-01-01
tomcat9 下載安裝和配置+整合到eclipse的教程詳解
這篇文章主要介紹了tomcat9 下載安裝和配置+整合到eclipse,本文通過圖文并茂的形式給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下2020-07-07
詳解tomcat部署靜態(tài)html網(wǎng)站方法
這篇文章主要介紹了tomcat部署靜態(tài)html網(wǎng)站方法,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2018-06-06
Tomcat 類加載器的實(shí)現(xiàn)方法及實(shí)例代碼
這篇文章主要介紹了Tomcat 類加載器的實(shí)現(xiàn)方法及實(shí)例代碼,本文給大家介紹的非常詳細(xì),具有一定的參考借鑒價值 ,需要的朋友可以參考下2019-05-05
使用jenkins將項(xiàng)目部署到另一臺主機(jī)的過程
這篇文章主要介紹了使用jenkins將項(xiàng)目部署到另一臺主機(jī)的詳細(xì)過程,這這里手動部署需要關(guān)閉防火墻,確保git命令存在,拉取部署的項(xiàng)目包,具體實(shí)例代碼跟隨小編一起看看吧2021-10-10
Eclipse啟動Tomcat后無法訪問項(xiàng)目解決辦法
這篇文章主要介紹了Eclipse啟動Tomcat后無法訪問項(xiàng)目解決辦法的相關(guān)資料,需要的朋友可以參考下2017-04-04
redission-tomcat快速實(shí)現(xiàn)從單機(jī)部署到多機(jī)部署詳解
這篇文章主要介紹了redission-tomcat快速實(shí)現(xiàn)從單機(jī)部署到多機(jī)部署詳解,本文介紹一個基于redis的tomcat session管理開源項(xiàng)目:redission-tomcat,可無代碼侵入式地快速實(shí)現(xiàn)session共享,需要的朋友可以參考下2019-06-06

