- EJB 3 Developer Guide
- Michael Sikora
- 506字
- 2021-07-02 11:34:52
Introduction to the Java EE Architecture
Modern enterprise applications have their responsibilities divided over a number of layers. A common architecture is the 3-layer model consisting of presentation, business, and database layers. The presentation layer is responsible for presenting a user interface and handling interactions with the end user. The business layer is responsible for executing business logic. The database layer is responsible for storage of business data; typically a relational database management system is used for this layer. Layering is used throughout computer science for managing complexity where each layer serves a distinct purpose.

Java Platform Enterprise Edition (Java EE) technology provides services to enterprise applications using a multi-layer architecture. Java EE applications are web-enabled and Java based, which means they may be written once and deployed on any container supporting the Java EE standard. An application server is the environment in which the container resides. However, in practice we don't need to distinguish between an application server and a container, so we will use the terms interchangeably. The Java EE specification is supported by commercial vendors such as Sun, IBM, Oracle, BEA Systems as well as open-source ventures such as JBoss.
Java EE presentation layer technologies include servlets, JSP pages, and JSF components. These are developed for a business application then subsequently deployed and run in a web container. A client would interact with the web container either from a browser or an applet. In either case the http or https internet protocol would be used for communication.
Enterprise JavaBeans version 3 (EJB 3) is the technology Java EE version 5 (Java EE 5) provides for the business layer. In Java EE 5 we subdivide the business layer into one layer which is concerned with business processing and a second layer which deals with persistence. In EJB 3 the business processing artifacts are session and message-driven beans. These are developed for a business application and deployed and run in an EJB container. The persistence layer artifact is an entity; this is persisted to the database layer using a persistence provider or persistence engine. The persistence engine implements another specification, the Java Persistence API (JPA). Both EJB 3 and the JPA are specifications for which a number of organizations provide implementations. Both specifications can be downloaded from http://www.jcp.org/en/jsr/detail?id=220. The figure below summarizes Java EE 5 architecture:

Note that our 3-layer model has become 5-layers. The distinction between client/web and business logic/persistence layers is not always made. Consequently we refer to Java EE architecture simply as n-layer or multi-layer. A Java EE container offers many other services such as web services, the Java Messaging Service (JMS), and resource adapters.
Note from the diagram that we can access an EJB directly from a Java SE application, such as Swing, without going through a web container. The Java application can be stand-alone, or can be run from an Application Client Container (ACC). An ACC enables a client executing in its own Java Virtual Machine (JVM) outside the EJB container to access a limited number of Java EE services.
- IBM Lotus Notes 8.5 User Guide
- Spring Python 1.1
- AutoCAD 2019中文版從入門到精通
- 影視動畫場景與特效制作:3ds Max-Vue-AfterBurn-FumeFX
- PowerPoint 2019從入門到精通(移動學習版)
- Illustrator平面設計立體化教程:Illustrator 2021(微課版)
- VRP11/3ds Max虛擬現實制作標準實訓教程
- SolidWorks 2018快速入門及應用技巧
- Puppet權威指南
- 從零開始:Illustrator CC中文版基礎培訓教程
- Word-Excel-PowerPoint 2010三合一辦公應用實戰從入門到精通(超值版)
- Photoshop手繪從新手到高手
- 原片蛻變:Photoshop CC商業修圖必修課
- 玩轉電子設計:基于Altium Designer的PCB設計實例(移動視頻版)
- Autodesk Maya 2015標準教材II