Ordinary hut

          人間一福地,勝似天仙宮
          posts - 61, comments - 50, trackbacks - 0, articles - 1

          weblogic中的staging mode

          Posted on 2009-12-29 22:39 landor 閱讀(3788) 評論(0)  編輯  收藏 所屬分類: weblogic
          英文文檔如下:
          http://download.oracle.com/docs/cd/E12840_01/wls/docs103/deployment/deploy.html#wp1029629

          設(shè)置staging mode的文檔如下
          http://download.oracle.com/docs/cd/E12840_01/wls/docs103/ConsoleHelp/taskhelp/deployment/SetAServerStagingMode.html

          下面是部分翻譯,鑒于英文水平,這翻譯的實(shí)在太差,只能自己對付著看

          Nostage:管理服務(wù)器(Administration Server)并不拷貝所發(fā)布文件,相反,每一個(gè)目標(biāo)服務(wù)器必須通過一個(gè)單一源文件夾來訪問這個(gè)文件并進(jìn)行發(fā)布。目標(biāo)服務(wù)器(target servers)上的stage目錄在nostage模式下會被忽略。

          例如,如果你發(fā)布了一個(gè)Java EE應(yīng)用程序到集群中的三個(gè)服務(wù)器,那么每一個(gè)服務(wù)器必須能夠訪問相同的應(yīng)用程序文件(從一個(gè)共享的網(wǎng)絡(luò)目錄)去發(fā)布程序

          備注:發(fā)布文件的來源在nostage模式下是一個(gè)路徑,這個(gè)路徑是在發(fā)布的時(shí)候有用戶提供(與stage模式相反,stage模式的來源是每一個(gè)服務(wù)器的stage目錄)。盡管如此,甚至在nostage模式中,weblogic服務(wù)器拷貝出部分deployment到臨時(shí)目錄。這能使用戶去更新整個(gè)發(fā)布文件或者部分發(fā)布文件。

          nostage模式中,web容器自動(dòng)的檢測jsp或者servlet的改變。Nostage also allows you to later update only parts of an application by updating those parts in one file system location and then redeploying.

          當(dāng)僅僅發(fā)布到管理服務(wù)器的時(shí)候,管理控制臺使用nostage模式作為默認(rèn)值。Weblogic.Deployer使用目標(biāo)服務(wù)器的staging模式(就是看目標(biāo)服務(wù)器是哪種模式),管理服務(wù)器上默認(rèn)使用nostage模式。如果你在一個(gè)主機(jī)上運(yùn)行一個(gè)集群,或者你通過一個(gè)共享目錄發(fā)布一個(gè)非常大的應(yīng)用到多個(gè)主機(jī),那么也可以選擇nostage模式。用nostage模式來發(fā)布大應(yīng)用會節(jié)省發(fā)布時(shí)間,因?yàn)椴恍枰獜?fù)制文件。

           

          Stage:管理服務(wù)器把所發(fā)布的文件從原始的位置(在管理服務(wù)器上)拷貝到目標(biāo)服務(wù)器的staging目錄上。例如,如果你采用stage模式發(fā)布一個(gè)Java EE應(yīng)用到集群的三個(gè)服務(wù)器上,這個(gè)管理服務(wù)器會在集群中的每一個(gè)服務(wù)器上都拷貝一份。每一個(gè)服務(wù)器使用拷貝過來的本地的文件來發(fā)布Java EE應(yīng)用。

           這里有個(gè)需要住的地方(個(gè)人記錄):在weblogic10+中,如果清除了集群中一個(gè)服務(wù)器的緩存,比如這個(gè)服務(wù)器叫appserver1,或者刪除了stage目錄下的文件,那么程序不會自動(dòng)從管理服務(wù)器上自動(dòng)把程序同步到appserver1的stage目錄,只有重新向管理服務(wù)器發(fā)布程序(是管理服務(wù)器,如果重新向appserver1發(fā)布程序,程序也不會被復(fù)制到stage目錄),這樣程序才會被拷貝到appserver1的stage目錄;再有一種情況,如果我在源目錄更改了jsp內(nèi)容,那么appserver1也不會同步這個(gè)jsp文件,必須人工的去appserver1的stage目錄去替換該jsp文件,才能做到及時(shí)更新。這也是采用nostage的一個(gè)好處,修改之后會立刻看到效果。

          如果不指定staging 目錄,那么默認(rèn)的目錄是stage

          ·  For exploded archive deployments, the deployment name and staging subdirectory are the name of the directory you deployed (physicianEar in the example above).

          ·  For archived deployments, the default deployment name is the name of the archive file without the extension. For example, if you deploy physicianEar.ear, the deployment name and staging subdirectory are physicianEar.

           

          當(dāng)發(fā)布到多個(gè)weblogic實(shí)例的時(shí)候,管理控制臺使用stage模式作為默認(rèn)模式。Weblogic.Deployer使用target服務(wù)器的staging mode作為默認(rèn),并且托管的服務(wù)器使用stage模式作為默認(rèn)。

          Stage模式保證每一個(gè)服務(wù)器有一個(gè)發(fā)布的本地拷貝,這樣由于一個(gè)網(wǎng)絡(luò)中斷會使管理服務(wù)器連接不上其他服務(wù)器也沒關(guān)系(因?yàn)樗玫氖潜镜匕l(fā)布)。如果你正要發(fā)布一個(gè)大的應(yīng)用到集群中的多個(gè)服務(wù)器,那會是非常耗費(fèi)時(shí)間的。可以考慮nostage模式去避免往多個(gè)服務(wù)器拷貝大文件的多余舉動(dòng)

           

          External_stagestage相似,目標(biāo)服務(wù)器使用本地的拷貝來發(fā)布應(yīng)用。然而,管理服務(wù)器并不自動(dòng)的拷貝所發(fā)布的文件到目標(biāo)服務(wù)器;相反,在發(fā)布之前,你必須拷貝這些文件到每一個(gè)目標(biāo)服務(wù)器的staging目錄。你可以手工的執(zhí)行拷貝或者用自動(dòng)化腳本。

          Within each target server’s staging directory, deployment files must be stored in a subdirectory that reflects the deployment name. This can either be the name you type in for the deployment, or the default deployment name (the name of the exploded archive directory, or the name of the archive file without its file extension).

          External_stage mode is the least common deployment staging mode. It is generally used only in environments that are managed by third-party tools that automate the required copying of files. You may also choose to use external_stage mode when you are deploying very large applications to multiple machines and you do not have a shared file system (and cannot use nostage mode). Using external_stage in this scenario decreases the deployment time because files are not copied during deployment.



          主站蜘蛛池模板: 浦县| 彭山县| 门源| 南汇区| 祁阳县| 宁陵县| 武邑县| 竹山县| 塘沽区| 漠河县| 古田县| 郯城县| 益阳市| 尼勒克县| 连城县| 乐安县| 南平市| 南宁市| 邵东县| 三明市| 怀仁县| 民丰县| 韩城市| 沅陵县| 曲阜市| 福清市| 开原市| 榆树市| 象州县| 西吉县| 峡江县| 马关县| 外汇| 安阳市| 西贡区| 敖汉旗| 新邵县| 丹巴县| 康定县| 德昌县| 隆昌县|