1
aim
for building integrated, enterprise-class
applications that share information, deliver
services, and automate collaboration among
networked companies at Internet volume and
speed
separate of presentation, business logic, and data
provide the underlying core functionality
necessary for the development and deployment of
business-driven application
connect legacy systems, and Web Services
11.12.2003 CENG 520 2
Gokce Banu Laleci
Why?
applications with complex business logic
potentially servicing tens of thousands of
concurrent users in real-time
require a scalability and reliability
Distributed system
Stock trading system
Banking application
Hosting Organization
Subscriber 1
Presentation
Logic
Subscriber 2
Persistence
Subscriber 3
Portable
Security
Transaction
Message-Driven Beans
ejbRemove ()
ejbStore ()
need to handle
need not be passivated Activation/Passivation
or activated One Session Bean
object per client
Objects can be pooled
to service multiple
clients
Message
Application Application
Oriented
Middleware
Connection
Session
Destination
MessageProducer
MessageConsumer
Message
3:Create
Session
JMS Connection
Serialized
Message
5:Create JMS Session
Client Producer or
Connection
Consumer
JMS Producer
1:RetrieveJ 6:Send or
MS Driver Receive Or
Connection Message
JMS Consumer
Factory
4:Lookuo JMS
Destination JMS Driver Client Runtime
JNDI
Naming
Service
1:call 2:delegate
method EJB object
3:call begin
Transaction
EJB Service
4:perform 5:call commit
business or abort
operations
11.12.2003 CENG 520 71
Gokce Banu Laleci
Declarative Transactions
EJB container handles
Declare in deployment descriptor
3:call begin
1:call Transaction
method EJB object 5:call commit Service
or abort
2:delegate
EJB
4:perform
business
operations
EJB Container
3:call begin
Client Code Transaction
5:call commit Service
or abort
1:call
method EJB object
2:delegate
EJB
4:perform
business
operations
none T2
Required
T1 T1
none T2
RequiresNew
T1 T2
none None
Supports
T1 T1
none Error
Mandatory
T1 T1
none None
NotSupported
T1 None
none None
Never
T1 error
11.12.2003 CENG 520 77
Gokce Banu Laleci
Programmatic Transactions
CORBA’s Object Transaction Service (OTS)
Multiple parties participating in a transaction
Basic interfaces that transactional object,
resources, resource managers, and transaction
managers use to interoperate