【正文】
Components What is JNDI Technology? ? JNDI = Java Naming and Directory Interface ? JNDI 提供了統(tǒng)一的 API,用于訪問不同廠家提供的命名服務(wù) ? JNDI and EJB ? JNDI plays an important role in the use of EJBs. ? to locate EJB remote home interfaces , EJB local home interfaces, Data resources. What is JDBC Technology? ? Java Database Connectivity ? JDBC? is a Java? API for executing SQL statements. ? JDBC provides a standard API for tool/database developers and makes it possible to write database applications using a pure Java API. ? JDBC makes it possible to do three things: ? 1. establish a connection with a database ? 2. send SQL statements ? 3. process the results What is JTA/JTS Technology? ? Java Transaction API/Java Transaction Service ? allows applications to perform distributed transactions, that is, transactions that access and update data on two or more worked puter resources ? JTS 對(duì)事務(wù)分界和事務(wù)環(huán)境的傳播之類的 服務(wù)提供支持。一個(gè) J2EE服務(wù)器提供 EJB容器( EJB Container)和Web容器( Web Container)。由在客戶端運(yùn)行的瀏覽器和 Java插件組成。應(yīng)用程序客戶端和它的容器運(yùn)行在客戶機(jī)。 Web組件和容器也在 J2EE服務(wù)其中運(yùn)行。 ? Containers in Java ? EJB容器:管理 J2EE應(yīng)用程序中企業(yè) Bean的運(yùn)行。 J2EE容器 ? 基于組件和平臺(tái)獨(dú)立的 J2EE平臺(tái)使 J2EE應(yīng)用程序容易開發(fā) ? 商業(yè)邏輯被封裝在可重用的 組件( EJB) 中。 What is EJB Technology? ? J2EE的基石 ? 服務(wù)器端的組件 ? Easy development and deployment of Java technologybased application that are: ? Transactional, distributed, multitier, portable, scalable, secure, … ? 共有三種 EJB: ? 會(huì)話 (session) bean:代表短暫的與客戶的會(huì)話,當(dāng)客戶結(jié)束執(zhí)行時(shí),會(huì)話 bean及它的數(shù)據(jù)就消失了 ? 實(shí)體 (entity) bean:實(shí)體 bean代表存儲(chǔ)在數(shù)據(jù)庫的表,如果客戶結(jié)束程序或服務(wù)器關(guān)閉,潛在的服務(wù)方法會(huì)將數(shù)據(jù)存儲(chǔ)。 ? 靜態(tài) HTML頁面及 applets域網(wǎng)絡(luò)組件綁在一起,但 J2EE規(guī)范沒有認(rèn)為這些為網(wǎng)絡(luò)組件。 ? Jsp頁面是基于文檔的,能像 servlet一樣執(zhí)行。 2. 網(wǎng)絡(luò)組件 ? J2EE網(wǎng)絡(luò)組件可以是 servlet或 jsp。 ? 動(dòng)態(tài)網(wǎng)頁包含各種標(biāo)記語言( HTML,XML等) ? 小程序:網(wǎng)頁可以包含小程序。 ? J2EE is EndtoEnd Solution ? J2EE應(yīng)用程序通常由三層構(gòu)成,因?yàn)樗麄兎植加谌齻€(gè)不同的位置:客戶機(jī)、服務(wù)器、后臺(tái)數(shù)據(jù)庫服務(wù)器。 表示層 中間層 / 功能層 數(shù)據(jù)層 應(yīng)用模式:三層結(jié)構(gòu) ? C/S三層:應(yīng)用程序客戶端 + 應(yīng)用服務(wù)器 + 數(shù)據(jù)庫服務(wù)器 ? B/S:瀏覽器 + Web服務(wù)器 + 數(shù)據(jù)庫服務(wù)器 ? NTier:瀏覽器 + 應(yīng)用服務(wù)器 + 數(shù)據(jù)庫服務(wù)器 ? 基于 Windows DNA的實(shí)現(xiàn)方案: (ASP+ ActiveXControl)+ (COM/COM+ )+ ODBC ? 基于 J2EE結(jié)構(gòu)的實(shí)現(xiàn)方案是: (JSP+ Servlet)+ JavaBeans/ EJB+ JDBC 應(yīng)用 程序 客戶端 應(yīng)用 服務(wù)器 數(shù)據(jù)庫 服務(wù)器 C / S 兩 層 結(jié) 構(gòu) 三 層 結(jié) 構(gòu) 和 多 層 結(jié) 構(gòu)應(yīng) 用 編 程模 式C O R B AW i n d o w sD N