2023年全國(guó)碩士研究生考試考研英語(yǔ)一試題真題(含答案詳解+作文范文)_第1頁(yè)
已閱讀1頁(yè),還剩17頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、<p>  外文翻譯,網(wǎng)上搜索所得</p><p>  基于J2EE在分布式環(huán)境下的底層結(jié)構(gòu)的自動(dòng)動(dòng)態(tài)配置的應(yīng)用</p><p>  Anatoly Akkerman, Alexander Totok, and Vijay Karamcheti</p><p>  摘要:為了實(shí)現(xiàn)廣域網(wǎng)中符合工業(yè)標(biāo)準(zhǔn)基于組件的應(yīng)用程序中動(dòng)態(tài)的可適應(yīng)性,我們需要一種框架來(lái)在這

2、樣的環(huán)境里自動(dòng)化地配置J2EE 應(yīng)用程序。這種需要對(duì)于哪怕在單一的應(yīng)用程序服務(wù)器上嘗試部署J2EE應(yīng)用的人來(lái)說(shuō)也顯而易見,這種任務(wù)設(shè)計(jì)到大量的系統(tǒng)服務(wù)和應(yīng)用組件的配置。</p><p>  關(guān)鍵詞:j2ee;動(dòng)態(tài)配置;分布式;組件;</p><p><b>  1 前言</b></p><p>  近幾年,我們已經(jīng)看到基于組件的企業(yè)應(yīng)用開發(fā)的顯

3、著增加。這種應(yīng)用程序通常被部署在公司的內(nèi)部網(wǎng)或者是因特網(wǎng)上,以高事務(wù)容量,大量的用戶和覆蓋范圍廣的訪問為特征,它通常會(huì)被部署在中央?yún)^(qū)域,采用服務(wù)器集群來(lái)均衡負(fù)載從而支持用戶下載。但是這種平均負(fù)荷的方法被證明只對(duì)減少應(yīng)用轉(zhuǎn)發(fā)的用戶可以察覺的反應(yīng)時(shí)間有效,而對(duì)于減少網(wǎng)絡(luò)方面的延遲作用不大,垂直分割(例如…運(yùn)行網(wǎng)絡(luò)層和事務(wù)層在不同的虛擬機(jī))被用于錯(cuò)誤分離和均衡負(fù)荷,但是它是不符合實(shí)際的由于遠(yuǎn)程調(diào)運(yùn)的大量使用顯著地增加了運(yùn)行時(shí)時(shí)間。最近的著作已

4、經(jīng)表明在廣域網(wǎng)中利用垂直負(fù)荷而不引起前面所述的超時(shí)問題的可行性。那非研究的主要結(jié)論可以概括如下:</p><p>  (1) 應(yīng)用合適的應(yīng)用程序,在廣域網(wǎng)中的垂直負(fù)荷可以察覺的延遲。</p><p>  (2) 廣域垂直層需要復(fù)制應(yīng)用層組件而且需要維持和原組件間的一致性。</p><p>  (3) 新加的復(fù)制組件可以被動(dòng)態(tài)配置以滿足新的需要。</p>

5、<p>  (4) 事實(shí)上,不同的復(fù)制組件可能會(huì)根據(jù)應(yīng)用不同的方式實(shí)現(xiàn)相組件。</p><p>  (5) 新的請(qǐng)求路徑可以復(fù)用先前的組件配置路徑。</p><p>  應(yīng)用智能監(jiān)視和人工智能規(guī)劃方法再結(jié)合那個(gè)研究得出的結(jié)論,我們看到通過(guò)動(dòng)態(tài)布置基于動(dòng)態(tài)監(jiān)視的額外的應(yīng)用組件,在廣域網(wǎng)中符合工業(yè)標(biāo)準(zhǔn)基于組件的應(yīng)用程序中動(dòng)態(tài)的可適應(yīng)性是可以實(shí)現(xiàn)的。然而,為了實(shí)現(xiàn)這種動(dòng)態(tài)可適性,我們

6、需要一種框架來(lái)在這樣的環(huán)境里自動(dòng)化地配置J2EE 應(yīng)用程序。這種需要對(duì)于哪怕在單一的應(yīng)用程序服務(wù)器上嘗試布置J2EE應(yīng)用的人來(lái)說(shuō)也顯而易見,這種任務(wù)設(shè)計(jì)到大量的系統(tǒng)服務(wù)和應(yīng)用組件的配置。例如你必須在配置和部署應(yīng)用組件前先建立JDBC數(shù)據(jù)源,設(shè)立消息目的地和資源適配器。在需要跨越多個(gè)節(jié)點(diǎn)服務(wù)器的廣域網(wǎng)配置中,這將更加復(fù)雜,因?yàn)楦嗟谋憷麅?nèi)部節(jié)點(diǎn)通信的系統(tǒng)服務(wù)需要配置和啟動(dòng),而且多種配置數(shù)據(jù)比如IP地址,端口號(hào),JNDI名字和其他的數(shù)據(jù)在多

7、個(gè)節(jié)點(diǎn)的配置文件中必須維持一致性。這種分布式配置框架必須滿足:</p><p>  (1) 聲明內(nèi)部組件一致性規(guī)范和定義它對(duì)組件配置部署的影響。</p><p>  (2) 聲明應(yīng)用程序組件對(duì)應(yīng)用服務(wù)器,以及它們的配置和部署的依賴性。</p><p>  (3) 提供簡(jiǎn)單但可表達(dá)的抽象方法去控制通過(guò)部署和拆卸組件獲得的適用性。</p><p>

8、;  (4) 能夠復(fù)用服務(wù)和組件從而高效的利用網(wǎng)路節(jié)點(diǎn)資源。</p><p>  (5) 提供上述便利而不會(huì)增加應(yīng)用程序員的設(shè)計(jì)負(fù)擔(dān)。</p><p>  在本論文中,我們提出自動(dòng)動(dòng)態(tài)部署J2EE應(yīng)用程序的框架涉及了上面的所有問題,這種框架為組件定義了結(jié)構(gòu)描述語(yǔ)言,鏈接說(shuō)明和集合。這種組件說(shuō)明語(yǔ)言用來(lái)描述應(yīng)用程序組件和鏈接,它使得應(yīng)用組件與系統(tǒng)組件中清晰的分開。一種靈活的系統(tǒng)類型用來(lái)定義組

9、件接口和端口的兼容性。一種為配置組件屬性而開發(fā)的定義和表述語(yǔ)言允許內(nèi)部組件間獨(dú)立的規(guī)范和組件間屬性的繼承。組件集合語(yǔ)言允許先前定義的復(fù)制的組件通過(guò)連接合適的端口集合到應(yīng)用路徑,連接時(shí)通過(guò)鏈接復(fù)制對(duì)象和具體把這些復(fù)制組件映射到目標(biāo)應(yīng)用服務(wù)器節(jié)點(diǎn)。組件配置過(guò)程評(píng)估了應(yīng)用程序路徑的正確性,確認(rèn)在系統(tǒng)組件上的應(yīng)用組件的獨(dú)立性和完成復(fù)制組件的部署。根據(jù)這些配置使先前部署的復(fù)制組件在新的路徑中得以匹配和復(fù)用的努力正在做出。我們把這種架構(gòu)作為JBos

10、s開源java應(yīng)用服務(wù)器的一部分加以實(shí)現(xiàn),在幾個(gè)J2EE樣本程序比如Java PetStore,,RUB和 TPC_W_NYU中進(jìn)行測(cè)試。這種架構(gòu)實(shí)現(xiàn)利用了JBoss的可擴(kuò)展的微內(nèi)核結(jié)構(gòu),基于JMX規(guī)范。JBoss的組件結(jié)構(gòu)允許根據(jù)部署應(yīng)用程序的需要增加服務(wù)配置。我們相信通過(guò)動(dòng)態(tài)部署和拆卸系統(tǒng)服務(wù)來(lái)重構(gòu)應(yīng)用服務(wù)器對(duì)構(gòu)建高效</p><p>  2 J2EE背景知識(shí)</p><p><

11、;b>  2.1 介紹</b></p><p>  組件框架。組件框架是一種中間件系統(tǒng),它支持遵守一定標(biāo)準(zhǔn)的有不同組件構(gòu)成的應(yīng)用程序。應(yīng)用組件被塞入這種確立它們運(yùn)行環(huán)境和規(guī)定它們交互的框架中。這通常是通過(guò)容器,組件持有者來(lái)實(shí)現(xiàn)的。這種容器也提供通常需要的功能以實(shí)現(xiàn)命名,安全性,事務(wù),和持久性!組件框架為組件的執(zhí)行提供了一個(gè)集成的環(huán)境,因此顯著的減少了在設(shè)計(jì),實(shí)現(xiàn),部署和維護(hù)應(yīng)用程序時(shí)工作。現(xiàn)在

12、工業(yè)上的組件框架標(biāo)準(zhǔn)以對(duì)象管理組的CORBA組件模型, SUN 公司的JAVA 2 Platform J企業(yè)版[J2EE]和微軟公司的.NET標(biāo)準(zhǔn),其中在企業(yè)里應(yīng)用最為廣泛的組件框架是2EEE。J2EE. J2EE是開發(fā)多層企業(yè)應(yīng)用JAVA程序的綜合性的標(biāo)準(zhǔn)。J2EE規(guī)范定義如下:</p><p>  (1) 組件編程模型。</p><p>  (2) 組件和主服務(wù)器的鏈接。</p&

13、gt;<p>  (3) 服務(wù)器提供給組件的服務(wù)。</p><p>  (4) 各種各樣的人物角色。</p><p>  (5) 兼容性檢驗(yàn)裝置和編譯測(cè)試程序。</p><p>  在眾多的服務(wù)列表中,消息通信,事務(wù)處理,命名機(jī)制和其它應(yīng)用組件用到的服務(wù)是應(yīng)用服務(wù)器必須提供的。用J2EE進(jìn)行應(yīng)用開發(fā)必須遵守經(jīng)典的3層結(jié)構(gòu)—表現(xiàn)層,業(yè)務(wù)層和企業(yè)信息系統(tǒng)層

14、。屬于各層的J2EE組件在開發(fā)時(shí)遵守具體的J2EE標(biāo)準(zhǔn)。</p><p>  1、表現(xiàn)層或者網(wǎng)絡(luò)層</p><p>  這一層實(shí)際上又被分為客戶端和服務(wù)器端??蛻舳税g覽器,applets,Java應(yīng)用程序等和負(fù)責(zé)和服務(wù)器端的表現(xiàn)層或者業(yè)務(wù)層進(jìn)行交互。服務(wù)器端包括servlet、jsp和靜態(tài)網(wǎng)頁(yè)內(nèi)容。這些組件負(fù)責(zé)把業(yè)務(wù)數(shù)據(jù)傳遞給終端用戶。數(shù)據(jù)本身通常從業(yè)務(wù)層獲得有時(shí)也從企業(yè)信息系統(tǒng)層直接

15、獲得。表現(xiàn)層的服務(wù)器端通常通過(guò)Http協(xié)議來(lái)進(jìn)行訪問。</p><p><b>  業(yè)務(wù)層或者EJB層</b></p><p>  這一層包含EJB,即企業(yè)應(yīng)用的事務(wù)邏輯模型。這些組件提供了持久化機(jī)制和事務(wù)支持。EJB中的組件通過(guò)RMI被調(diào)用。在Java虛擬機(jī)調(diào)用或者異步的消息傳遞,取決與EJB組件的類型。EJB規(guī)范定義了很多種組件。它們?cè)谡{(diào)用風(fēng)格(同步和異步,本地和

16、遠(yuǎn)程)與狀態(tài)(完全狀態(tài),不可持久狀態(tài),可持久)方面不同。同步調(diào)用的EJB組件通過(guò)特定的工廠代理對(duì)象來(lái)表現(xiàn)自己。這種工廠代理對(duì)象通常被EJB部署者綁定在JNDI中。EJB對(duì)象允許或者本地EJB對(duì)象是特定EJB實(shí)例的代理。</p><p>  3、企業(yè)信息系統(tǒng)或者數(shù)據(jù)層</p><p>  這一層指的就是企業(yè)信息系統(tǒng),比如關(guān)系數(shù)據(jù)庫(kù),ERP系統(tǒng),消息系統(tǒng)等。業(yè)務(wù)層和持久層在資源適配器的幫助下與

17、該層進(jìn)行通信。資源適配器在Java連結(jié)結(jié)構(gòu)中被定義。J2EE編程模型一直被認(rèn)為是分布式的編程模型,在該模型中應(yīng)用組件在J2EE服務(wù)器上運(yùn)行并且彼此可以相互交互。經(jīng)過(guò)初始化說(shuō)明和第一個(gè)服務(wù)實(shí)現(xiàn)后,該技術(shù),更顯著的說(shuō)EJB技術(shù),已經(jīng)明顯地從純粹的分布式計(jì)算模型轉(zhuǎn)向了本地交互。轉(zhuǎn)變的背后有合理的性能有關(guān)的原因,然而分布式的特征現(xiàn)在還存在。J2EE規(guī)范已經(jīng)經(jīng)過(guò)了好幾次修訂,現(xiàn)在最穩(wěn)定的版本是1.3,1.4版本正處于重審階段。我們應(yīng)該把注意力放在

18、1.3版本上,而實(shí)際上是在學(xué)習(xí)后者。適用與商業(yè)的J2EE實(shí)現(xiàn)可以大量的從BEA系統(tǒng),IBM,Oracle等贊助商得到。包括JBoss和JOnAS在內(nèi)的開源實(shí)現(xiàn)據(jù)稱兼容性也不錯(cuò)。最近名單上有多出了新的Apache project Geronimo。</p><p>  2.2 J2EE組件編程模型</p><p>  在我們基本的J2EE組件前,先讓我們強(qiáng)調(diào)一下什么是組件。軟件組件是有一系

19、列的具體的接口和明確的上下文環(huán)境構(gòu)成。它可以被獨(dú)立的部署而且易于被第三方重構(gòu)。根據(jù)以上的定義,如下的組成J2EE應(yīng)用程序的實(shí)體可以看作是軟件組件:</p><p>  (1) EJBS(會(huì)話,實(shí)體,消息驅(qū)動(dòng))。</p><p>  (2) Web組件(Servlet、JSP)。.</p><p><b>  (3) 消息目的。</b></

20、p><p><b>  (4) 數(shù)據(jù)源。</b></p><p>  EJB和Web組件被部署在由應(yīng)用服務(wù)贊助商提供的容器中.它們有定義良好的容器規(guī)則來(lái)管理生命周期,線程,持久化和其他問題。EJB和Web組件都利用JNDI目錄機(jī)制去尋找資源和它們想要交互的其EJB組件。目錄被執(zhí)行的JNDI環(huán)境被獨(dú)立的由容器的每個(gè)組件加以維護(hù)。該種環(huán)境下的綁定機(jī)制通常由組件部署的解釋者加以

21、配置。消息目的地,像對(duì)話和隊(duì)列,是由消息服務(wù)執(zhí)行所提供的資源。數(shù)據(jù)源是提供給應(yīng)用服務(wù)器的為事務(wù)組件進(jìn)入到企業(yè)信息服務(wù)層提供數(shù)據(jù)接口,通常由被應(yīng)用服務(wù)器管理的JDBC連接池實(shí)例化。一個(gè)J2EE編程者明確編寫的項(xiàng)目只有EJB和Web組件。這些用戶編寫的組件彼此交互而且系統(tǒng)服務(wù)可以是明顯的也可以是隱含的。例如,EJB開發(fā)者可以選擇明確的事務(wù)區(qū)分方式,這種方式意味著開發(fā)者假設(shè)通過(guò)定義良好接口的事務(wù)經(jīng)理服務(wù)平臺(tái)來(lái)書寫明確的程序交互?;蛘?,開發(fā)者也

22、可選擇容器管理事務(wù)區(qū)分的方式。這樣由于組件的事務(wù)行為通過(guò)他的描述者來(lái)定義而且全部用EJB容器來(lái)處理,因此作為一個(gè)隱式獨(dú)立的EJB提供潛在的事務(wù)管理服務(wù)。</p><p>  2.3 組件間的鏈接</p><p>  2.3.1 遠(yuǎn)程交互</p><p>  J2EE僅定義了三種可以在不同應(yīng)用服務(wù)器間傳遞的基本組件間連接類型。在這三種情況下,通信通過(guò)特定的Java

23、對(duì)象來(lái)完成。</p><p>  (1) 遠(yuǎn)程EJB調(diào)用:同步的EJB調(diào)用通過(guò)主EJB對(duì)象和EJB對(duì)象接口來(lái)實(shí)現(xiàn)。</p><p>  (2) Java連結(jié)器的外部連接:同步消息接收,同步和異步消息發(fā)送,用連接工廠和連接接口進(jìn)行數(shù)據(jù)庫(kù)查詢。</p><p>  (3) Java連接器的內(nèi)部連接:異步消息傳遞進(jìn)入消息驅(qū)動(dòng)Bean只能使用Activation Spec

24、對(duì)象。</p><p>  在前兩個(gè)實(shí)例中,應(yīng)用組件的開發(fā)者不僅書寫執(zhí)行在組件的運(yùn)行時(shí)JNDI環(huán)境中的對(duì)象目錄代碼,而且書寫發(fā)布方法調(diào)用,與遠(yuǎn)程的組件相互發(fā)送和接受消息。組件的運(yùn)行時(shí)JNDI環(huán)境為每一個(gè)組件部署所創(chuàng)建。環(huán)境中的綁定在組件部署時(shí)由部署者進(jìn)行初始化。這些綁定被假設(shè)為是靜態(tài)的,因?yàn)橐?guī)格中沒有提供任何的容器和組件間協(xié)議去提示綁定發(fā)生了變化。在 Java連接器的內(nèi)部通信情景下,Activation Spec

25、 對(duì)象查詢以及所有的相應(yīng)的M容器隱式的完成。雖然查詢的協(xié)議還沒有被標(biāo)準(zhǔn)化,但是假設(shè)一個(gè)基于JMX或者JNDI的查詢是合理的。 假設(shè)潛在的應(yīng)用服務(wù)器提供了所有的設(shè)備去控制部署過(guò)程的每一步,那么在兩個(gè)J2EE組件間確立一個(gè)連接需要涉及:</p><p>  (1) 部署目標(biāo)組件類。</p><p>  (2) 創(chuàng)建一個(gè)特定的Java對(duì)象用作目標(biāo)組件代理。</p><p>

26、;  (3) 用組件的命名服務(wù)去綁定目標(biāo)。</p><p>  (4) 啟動(dòng)目標(biāo)組件。</p><p>  (5) 部署指定的組件類。</p><p>  (6) 在主機(jī)的命名服務(wù)中,創(chuàng)建和進(jìn)行指定組件的運(yùn)行環(huán)境。</p><p>  (7) 啟動(dòng)指定的組件。</p><p>  然而,沒有一個(gè)現(xiàn)代的應(yīng)用服務(wù)器允許詳細(xì)

27、的控制所有組件類型的部署過(guò)程除了在它們的部署解釋器中的有限的選擇。因此我們的架構(gòu)將使用簡(jiǎn)化的途徑,它所依賴的特征在現(xiàn)在的大多數(shù)的應(yīng)用服務(wù)器上都可以得到。</p><p>  (1) 動(dòng)態(tài)部署消息目的和數(shù)據(jù)源的能力。</p><p>  (2) 創(chuàng)建和綁定特定的JNDI目標(biāo)去訪問消息目的和數(shù)據(jù)源的能力。</p><p>  (3) 把初始綁定的EJB對(duì)象到EJB部署組

28、件的能力。</p><p>  (4) 用在參考組件運(yùn)行環(huán)境中的JNDI指引去指出綁定的參考EJB的能力。</p><p>  在只有相同的應(yīng)用服務(wù)器的架構(gòu)中,上面的功能對(duì)通過(guò)簡(jiǎn)單的部署控制解釋器方式來(lái)控件間的連接已經(jīng)足夠了。然而,在不同應(yīng)用服務(wù)器的環(huán)境下,由于跨服務(wù)器的類下載問題,這種簡(jiǎn)單的控制解釋器的方式是不夠的。</p><p>  2.3.2 本地交互&l

29、t;/p><p>  一些組件間的交互可以發(fā)生在同一地點(diǎn)的相同應(yīng)用服務(wù)器虛擬機(jī)的組件間,有時(shí)候甚至可以發(fā)生在只有相同容器的組件間。在Web層,這種交互的例子是 servlet到 servlet的請(qǐng)求轉(zhuǎn)發(fā)。在EJB層,這種交互的例子是CMP實(shí)體關(guān)系和通過(guò)EJB本地接口的調(diào)用。這種本地部署所關(guān)心的不是在分布式架構(gòu)中去表現(xiàn)而是去增強(qiáng)一致性。因此,這種架構(gòu)把所有的本地的組件請(qǐng)求當(dāng)作一個(gè)單一的組件加以對(duì)待。</p>

30、<p>  2.4 部署J2EE應(yīng)用程序和系統(tǒng)服務(wù)</p><p>  2.4.1 部署應(yīng)用程序組件</p><p>  部署和拆卸標(biāo)準(zhǔn)的J2EE組件還沒有統(tǒng)一的標(biāo)準(zhǔn),因此每個(gè)應(yīng)用服務(wù)的提供商對(duì)組件的部署和拆卸提供了單獨(dú)的功能于J2EE規(guī)范中沒有定義標(biāo)準(zhǔn)組件的包,包的格式和包內(nèi)的基于xml部署解釋器的位置,因此這種包對(duì)于沒有所屬權(quán)變化的應(yīng)用服務(wù)器不需要部署。具體變化的例子

31、有:</p><p>  (1) 支持或者取代標(biāo)準(zhǔn)所有者解釋器的新的所有者解釋器的產(chǎn)生。</p><p>  (2) 具體服務(wù)應(yīng)用程序類的代碼的更替。</p><p>  為了著手構(gòu)建一個(gè)能夠部署不可網(wǎng)絡(luò)的動(dòng)態(tài)的分布式的架構(gòu),我們提出了一種普遍的部署單元即一個(gè)簡(jiǎn)單的基于xml部署的解釋器或者是一組類似的綁定到文檔中的解釋器。文檔可能包含用于執(zhí)行組件的Java類或者任

32、何其它的所需組件。相應(yīng)地,部署解釋器也可以簡(jiǎn)單地用URL來(lái)索引代碼。我們假設(shè)這種動(dòng)態(tài)的部署和拆卸服務(wù)存在于所有的兼容的J2EE服務(wù)器上而且在不理解類重載相關(guān)問題時(shí)一個(gè)健壯的類重載結(jié)結(jié)構(gòu)的應(yīng)用服務(wù)器就能夠重復(fù)的部署生命周期。大多數(shù)現(xiàn)代的應(yīng)用服務(wù)器都提供這樣的功能。</p><p>  2.4.2 部署系統(tǒng)組件</p><p>  對(duì)應(yīng)用組件來(lái)說(shuō),J2EE規(guī)范只是少了在部署和拆卸時(shí)的明確定義

33、,而對(duì)系統(tǒng)服務(wù)來(lái)說(shuō),在這方面做的更糟。對(duì)系統(tǒng)服務(wù)來(lái)說(shuō)不僅沒有具體的定義一個(gè)標(biāo)準(zhǔn)化的部署,實(shí)際上,這個(gè)規(guī)格甚至連沒有強(qiáng)調(diào)在生命周期屬性方面的要求,更不用手強(qiáng)調(diào)依賴也潛在的系統(tǒng)服務(wù)的應(yīng)用組件的明確規(guī)范了取而代之的是它定義了部署者的角色,這個(gè)角色負(fù)責(zé)確保像組件的本性和系統(tǒng)的解釋器所暗示的那樣,所需的服務(wù)是基于應(yīng)用組件對(duì)系統(tǒng)服務(wù)依賴性的基礎(chǔ)之上。例如,假如有一個(gè)事務(wù)容器要至少用一種方法去開始一個(gè)新的事務(wù),那么一個(gè)帶有這樣的事務(wù)容器的EJB就需要

34、在應(yīng)用層表示事務(wù)管理服務(wù)。與之相似的是,一個(gè)消息驅(qū)動(dòng)的bean,也隱式需要一種運(yùn)行在網(wǎng)絡(luò)上消息服務(wù)實(shí)例。它為MDB管理消息目的以及基于查詢的Java連接器通過(guò)它的管理服務(wù)層去提供這種消息服務(wù)。考慮到應(yīng)用層可能通常只用到了應(yīng)用服務(wù)器所提供的服務(wù)的一個(gè)子集,根據(jù)應(yīng)用層的需要允許遞增的配置服務(wù)的組件應(yīng)用服務(wù)器允許更高效的利用多種資源。包括,開源的應(yīng)用服務(wù)器,JBoss和OnAS在內(nèi),已經(jīng)有多種J2EE應(yīng)用服務(wù)器已經(jīng)全部或者部分的實(shí)現(xiàn)了組件化。

35、我們感覺到通過(guò)動(dòng)態(tài)的部署和拆卸系統(tǒng)服務(wù),動(dòng)態(tài)的配置應(yīng)用服務(wù)器</p><p><b>  參考文獻(xiàn)</b></p><p>  [1] Matt Bishop. Computer Security: Art and Science. New York, 2002</p><p>  [2] Matt Bishop. Vulnerabilitie

36、s Analysis. Proceedings of the Second International Symposium on Recent Advances in Intrusion Detection. Los Angeles 2006</p><p>  [3] Balasubra maniyan. Architecture for Intrusion Detection using Autonomous

37、 Agents[M]. Department of Computer Sciences, Purdue University, 1998.</p><p>  Infrastructure for Automatic Dynamic Deployment</p><p>  Of J2EE Application in Distributed Environments</p>

38、<p>  Anatoly Akkerman, Alexander Totok, and Vijay Karamcheti</p><p>  Abstract: in order to achieve such dynamic adaptation, we need an infrastructure for automating J2EE application deployment in suc

39、h an environment. This need is quite evident to anyone who has ever tried deploying a J2EE application even on a single application server, which is a task that involves a great deal of configuration of both the system s

40、ervices and application components.</p><p>  Key words: j2ee; component; Distributed; Dynamic Deployment; </p><p>  1 Introduction</p><p>  In recent years, we have seen a significa

41、nt growth in component-based enterprise application development. These applications are typically deployed on company Intranets or on the Internet and are characterized by high transaction volume, large numbers of users

42、and wide area access. Traditionally they are deployed in a central location, using server clustering with load balancing (horizontal partitioning) to sustain user load. However, horizontal partitioning has been shown ver

43、y efficient only in</p><p>  ? Using properly designed applications, vertical distribution across wide-area networks improves user-perceived latencies.</p><p>  ? Wide-area vertical layering req

44、uires replication of application components and maintaining consistency between replicas.</p><p>  ? Additional replicas may be deployed dynamically to handle new requests.</p><p>  ? Different

45、replicas may, in fact, be different implementations of the same component based on usage (read-only, read-write).</p><p>  ? New request paths may reuse components from previously deployed paths.</p>

46、<p>  Applying intelligent monitoring [6] and AI planning [2, 12] techniques in conjunction with the conclusions of that study, we see a potential for dynamic adaptation in industry-standard J2EE component-based app

47、lications in wide area networks</p><p>  Through deployment of additional application components dynamically based on active monitoring. However, in order to achieve such dynamic adaptation, we need an infra

48、structure for automating J2EE application deployment in such an environment. This need is quite evident to anyone who has ever tried deploying a J2EE application even on a single application server, which is a task that

49、involves a great deal of configuration of both the system services and application components. For example one has</p><p>  This distributed deployment infrastructure must be able to:</p><p>  ?

50、 address inter-component connectivity specification and define its effects on component configuration and deployment,</p><p>  ? address application component dependencies on application server services, the

51、ir configuration and deployment,</p><p>  ? provide simple but expressive abstractions to control adaptation through dynamic deployment and undeployment of components,</p><p>  ? enable reuse of

52、 services and components to maintain efficient use of network nodes’ resources,</p><p>  ? provide these facilities without incurring significant additional design effort on behalf of application programmers

53、.</p><p>  In this paper we propose the infrastructure for automatic dynamic deployment of J2EE applications, which addresses all of the aforementioned issues. The infrastructure defines architecture descrip

54、tion languages (ADL) for component and link description and assembly. The Component Description Language is used to describe application components and links. It provides clear separation of application components from s

55、ystem components. A flexible type system is used to define compatibility of componen</p><p>  Connecting appropriate ports via link replicas and specifying the mapping of these component replicas onto target

56、 application server nodes. The Component Configuration Process evaluates an application path’s correctness, identifies the dependencies</p><p>  of application components on system components, and configures

57、 component replicas for deployment. An attempt is made to match and reuse any previously deployed replicas in the new path based on their configurations. We implement the infrastructure as a part of the JBoss open source

58、 Java application server [11] and test it on several</p><p>  Sample J2EE applications – Java Pets tore [23], Rubies [20] and TPC-W-NYU [32]. The infrastructure implementation utilizes the JBoss’s extendable

59、 micro-kernel architecture, based on the JMX [27] specification. Componentized architecture of JBoss allows incremental service deployments depending on the needs of deployed applications. We believe that dynamic reconfi

60、guration of application servers through dynamic deployment and undeployment of system services is essential to building a resource-effi</p><p>  2 J2EE Background</p><p>  2.1 Introduction</p

61、><p>  Component frameworks. A component framework is a middleware system that supports applications consisting of components conforming to certain standards. Application components are “plugged” into the compo

62、nent framework, which establishes their environmental conditions and regulates the interactions between them. This is usually done through containers, component holders, which also provide commonly required support for n

63、aming, security, transactions, and persistence. Component frameworks provide </p><p>  J2EE. Java 2 Platform Enterprise Edition (J2EE) [25] is a comprehensive standard for developing multi-tier enterprise Ja

64、va applications. The J2EE specification among other things defines the following:</p><p>  ? Component programming model,</p><p>  ? Component contracts with the hosting server,</p><p

65、>  ? Services that the platform provides to these components,</p><p>  ? Various human roles,</p><p>  ? Compatibility test suites and compliance testing procedures.</p><p>  Amo

66、ng the list of services that a compliant application server must provide are messaging, transactions, naming and others that can be used by the application components. Application developed using J2EE adhere to the class

67、ical 3-Tier architectures – Presentation Tier, Business Tier, and Enterprise Information System (EIS) Tier (see Fig. 1). J2EE components belonging to each tier are developed adhering to the</p><p>  Specific

68、 J2EE standards.</p><p>  1. Presentation or Web tier.</p><p>  This tier is actually subdivided into client and server sides. The client side hosts a web browser, applets and Java applications

69、that communicate with the server side of presentation tier or the business tier. The server side hosts Java Servlet components [30], Java Server Pages (JSPs) [29] and static web content. These components are responsible

70、for presenting business data to the end users. The data itself is typically acquired from the business tier and sometimes directly from the Enterprise</p><p>  2. Business or EJB tier.</p><p>  

71、This tier consists of Enterprise Java Beans (EJBs) [24] that model the business logic of the enterprise application. These components provide persistence mechanisms and transactional support. The components in the EJB ti

72、er are invoked through remote invocations (RMI), in-JVM invocations or asynchronous message delivery, depending on the type of EJB component. The EJB specification defines several types of components. They differ in invo

73、cation style (synchronous vs. asynchronous, local vs. remote</p><p>  (e.g., Stateful Session Bean), stateful persistent (e.g., Entity Bean). Synchronously invocable EJB components expose themselves through

74、a special factory proxy object (an EJB Home object, which is specific to a given EJB), which is typically bound in JNDI by the deployer of the EJB. The EJB Home object allows creation or location of an EJB</p><

75、;p>  Object, which is a proxy to a particular instance of an EJB 1.</p><p>  3. Enterprise Information System (EIS) or Data tier.</p><p>  This tier refers to the enterprise information syste

76、ms, like relational databases, ERP systems, messaging systems and the like. Business and presentation tier component communicate with this tier with the help of resource adapters as defined by the Java Connector Architec

77、ture [26].The J2EE programming model has been conceived as a distributed programming model where application components would run in J2EE servers and communicate with each other. After the initial introduction and first

78、server i</p><p>  Distributed features are still available. The J2EE specification has seen several revisions, the latest stable being version 1.3, while version 1.4 is going through last review phases 3. We

79、 shall focus our attention on the former, while actually learning from the latter. Compliant commercial J2EE implementations are widely available from BEA Systems [4], IBM [9], Oracle [21] and other vendors. Several open

80、 source implementations, including JBoss [11] and JOnAS [19] claim compatibility as well. A</p><p>  Recent addition to the list is a new Apache project Geronimo [1].</p><p>  2.2 J2EE Component

81、 Programming Model</p><p>  Before we describe basic J2EE components, let’s first address the issue of defining what a component is a software component is a unit of composition with contractually specified

82、interfaces and explicit context dependencies only. A software component can be deployed independently and is subject to composition by third parties [31].According to this definition the following entities which make up

83、a typical J2EE application would be considered application components (some exceptions given below):</p><p>  ? EJBs (session, entity, message-driven),</p><p>  ? Web components (servlets, JSPs)

84、,</p><p>  ? messaging destinations,</p><p>  ? Data sources,</p><p>  EJB and Web components are deployed into their corresponding containers provided by the application server ven

85、dor. They have well-defined contracts with their containers that govern lifecycle, threading, persistence and other concerns. Both Web and EJB components use JNDI lookups to locate resources or other EJB components they

86、want to communicate with. The JNDI context in which these lookups are performed is maintained separately for each component by its container. Bindings messaging destinati</p><p>  Server. A J2EE programmer e

87、xplicitly programs only EJBs and Web components. These custom-written components interact with each other and system services both implicitly and explicitly. For example, an EJB developer may choose explicit transaction

88、demarcation (i.e., Bean-Managed Transactions) which means that the developer assumes the burden of writing explicit programmatic interaction with the platform’s Transaction Manager Service through well-defined interfaces

89、. Alternatively, the developer ma</p><p>  2.3 Links Between Components</p><p>  2.3.1 Remote Interactions</p><p>  J2EE defines only three basic inter-component connection types th

90、at can cross application server boundaries, in all three cases; communication is accomplished through special Java objects.</p><p>  ? Remote EJB invocation: synchronous EJB invocations through EJB Home and

91、EJB Object interfaces.</p><p>  ? Java Connector outbound connection: synchronous message receipt, synchronous and asynchronous message sending,</p><p>  Database query using Connection Factory

92、and Connection interfaces.</p><p>  ? Java Connector inbound connection: asynchronous message delivery into Message-Driven Beans (MDBs) only, utilizing Activation Spec objects. In the first two cases, an app

93、lication component developer writes the code that performs lookup of these objects in the component’s run-time JNDI context as well as code that issues method invocations or sends and receives messages to and from the re

94、mote component. The component’s run-time JNDI context is created for each deployment of the component.</p><p>  Bindings in the context are initialized at component deployment time by the deployed (usually b

95、y means of component’s deployment descriptors). These bindings are assumed to be static, since the specification does not provide any contract between the container and the component to inform of any binding changes In t

96、he case of Java Connector inbound communication, Activation Spec object lookup and all subsequent interactions with it are done implicitly by the MDB container. The protocol for lookup </p><p>  ? Deployment

97、 of target component classes (optional for some components, like destinations),</p><p>  ? Creation of a special Java object to be used as a target component’s proxy,</p><p>  ? Binding of this

98、object with component’s host naming service (JNDI or JMX),</p><p>  ? Start of the target component,</p><p>  ? Deployment of referencing component classes,</p><p>  ? Creation and

99、population of referencing component’s run-time context in its host naming service,</p><p>  ? start of the referencing component.</p><p>  However, none of modern application servers allow detai

100、led control of the deployment process for all component types beyond what is possible by limited options in their deployment descriptors 4. Therefore our infrastructure will use a simplified approach that relies on featu

101、res currently available on most application servers:</p><p>  ? Ability to deploy messaging destinations and data sources dynamically,</p><p>  ? Ability to create and bind into JNDI special obj

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 眾賞文庫(kù)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論