Session Beans: Use, Types, and Implementation in Component-based Software Development - Pr, Study notes of Engineering

This document, authored by dr. Ye wu for swe 645 course in 2006, discusses the use, benefits, concerns, and implementation of session beans in multi-tiered applications. It covers stateless and stateful session beans, their lifecycles, and transitions. Students will learn how to write interfaces, implement classes, and deploy session beans.

Typology: Study notes

Pre 2010

Uploaded on 02/12/2009

koofers-user-zkw
koofers-user-zkw 🇺🇸

9 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
Session Beans
Ye Wu
http://www.ise.gmu.edu/~wuye
SWE 645
Component-based Software Development
2006-9-20 © Dr. Ye Wu 2
When to Use Session Beans
Implement non-trivial enterprise’s workflow or
processes
Usually are used in multi-tiered applications
2006-9-20 © Dr. Ye Wu 3
Example
DB1
Manager DB1 DB2
Manager DB2
2006-9-20 © Dr. Ye Wu 4
Example
DB1
Manager DB1 DB2
Manager DB2
Session
Bean
pf3
pf4

Partial preview of the text

Download Session Beans: Use, Types, and Implementation in Component-based Software Development - Pr and more Study notes Engineering in PDF only on Docsity!

Session Beans

Ye Wu

http://www.ise.gmu.edu/~wuye

SWE 645

Component-based Software Development

2006-9-

© Dr. Ye Wu

2

When to Use Session Beans

•^

Implement non-trivial enterprise’s workflow orprocesses

-^

Usually are used in multi-tiered applications

2006-9-

© Dr. Ye Wu

3

Example

DB Manager

DB

DB Manager

DB

2006-9-

© Dr. Ye Wu

4

Example

DB1Manager

DB

DB Manager

DB

SessionBean

2006-9-

© Dr. Ye Wu

5

Why Using Session Beans

•^

Simplify Enterprise Application

-^

Decouple dependences between client and server

-^

Reduce network traffic

-^

Enhanced security, transaction support

-^

Increase maintainability

2006-9-

© Dr. Ye Wu

6

Concerns for Session Beans

•^

How to determine the scope for a Session Beans– Use cases– Classes

2006-9-

© Dr. Ye Wu

7

Stateless vs Stateful Session Beans

•^

A stateful session bean can keep data betweenclient accesses. A stateless session bean must not.

-^

Both represent a private resource for the client thatcreated them

-^

Both are intend to model a process or task

-^

Both can update shared data, but do not representthat shared data in the way that an entity beandoes.

2006-9-

© Dr. Ye Wu

8

Stateless Session Bean LifeCycle

Not Exist Method Ready

Class.newInstance()

injection

PostConstruct

@Predestroy

Businessmethods

2006-9-

© Dr. Ye Wu

13

Implementing Stateful Session Beans

SAME!!!