- EJB 3 Developer Guide
- Michael Sikora
- 258字
- 2021-07-02 11:34:53
Introduction
In object-oriented analysis and design a control class encapsulates business logic for a use case. Session beans are used to implement such control classes. Check credit card details, transfer funds, and book reservation are examples of potential session bean candidates. Session beans are transient and relatively short lived. In particular, session beans are not persistent; they are not stored in a database or other permanent file system. Session beans can create and update entities, which are persistent, as we shall see in the following chapters.
A client interacts with a session bean by invoking one or more methods defined in the bean. This sequence of method calls we call a session, hence the name session beans. The client can be a web-tier client such as a servlet or JSP page, or a standalone Java application program.
Like EJB 2.x, EJB 3 session beans are a component technology. In EJB 3 a session bean component consists of a bean interface and a bean class. The bean interface provides all the bean method definitions, the bean class provides the method implementations. We no longer have to produce a home interface as was required in EJB 2.x.
It is important to stress that the client does not interact directly with a bean. Instead the client interacts with a proxy generated by the EJB container. This proxy intercepts method calls and provides the container services such as transaction management and security.
Session beans come in two flavors: stateless and stateful. We will start with an example of a stateless session bean.
- iPad+Procreate數(shù)字插畫設(shè)計案例教程(全彩微課版)
- PS職場達人煉成記:人人都能學會的Photoshop辦公設(shè)計技巧
- 創(chuàng)意UI:Photoshop玩轉(zhuǎn)移動UI設(shè)計
- Excel 數(shù)據(jù)處理與分析實例教程(第2版)
- 圖像處理基礎(chǔ)教程(Photoshop CS5)(第2版)
- Adobe創(chuàng)意大學InDesign CS5 版式設(shè)計師標準實訓教材
- 音樂日記:Logic Pro X場景x風格編曲實用教程
- Ogre 3D 1.7 Beginner's Guide
- Unity 3D\2D手機游戲開發(fā):從學習到產(chǎn)品(第4版)
- Premiere Pro CC 2018基礎(chǔ)教程(第3版)
- 詳解AutoCAD 2022電氣設(shè)計(第6版)
- 中文版After Effects 2022基礎(chǔ)教程
- Photoshop插畫藝術(shù)火星風暴
- 中文版Photoshop CS6應(yīng)用技法教程
- Photoshop CC入門與提高