- 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.
- 中文版CorelDRAW 2022基礎教程
- Drupal Multimedia
- 會聲會影視頻編輯實戰秘技250招
- Building Websites with ExpressionEngine 1.6
- WCF Multi/tier Services Development with LINQ
- UG NX 12.0中文版從入門到精通
- Microsoft SQL Azure Enterprise Application Development
- Moodle Course Conversion: Beginner's Guide
- 零基礎攝影后期修圖 Photoshop照片處理輕松入門
- CorelDRAW X6平面設計與制作案例教程
- 中文版Photoshop CC基礎教程
- 機械CAD軟件應用入門指導書
- Joomla! 1.5 JavaScript jQuery
- HBase企業應用開發實戰
- MSC Fatigue疲勞分析標準教程