市面 EJB 教材常見三大缺失:
本系列採取抓住根本、暫忽細節策略(同學 UML 一樣),帶你穿透現象看本質。
| 技術 | 優勢 | 劣勢 |
|---|---|---|
| TP Monitor (CICS, Tuxedo) | 事務、安全、資源管理、負載平衡、容錯;三層架構(表示/邏輯/資源) | 程序語言(COBOL/PL1)、難重用、擴展性差 |
| 分散式組件 (CORBA, RMI, DCOM) | 遠程代理訪問商業對象;更好重用與彈性 | 難開發、缺乏健壯基礎設施(事務/安全等) |
EJB = TP Monitor 基礎設施 + 分散式組件開發模型。EJB Server 為組件提供 TP Monitor 級運行環境,開發者專注業務邏輯。
"The Enterprise JavaBeans architecture is a component architecture for the development and deployment of component-based distributed business applications. Applications written using the Enterprise JavaBeans architecture are scalable, transactional, and multi-user secure. These applications may be written once, and then deployed on any server platform that supports the Enterprise JavaBeans specification."
核心關鍵字:可擴展、事務化、多用戶安全、一次編寫到處部署 → 適合「任務關鍵型」企業級應用。
帶著問題閱讀:這個特性解決了什麼問題?為什麼這樣設計?如何在不依賴特定工具的情況下理解其本質? 祝旅途愉快!