Академический Документы
Профессиональный Документы
Культура Документы
Objectives
Ver. 1.0
Slide 1 of 33
A session bean is a:
Server-side client resource.
Service, which provides server-side services to a client.
Ver. 1.0
Slide 2 of 33
Ver. 1.0
Slide 3 of 33
Ver. 1.0
Slide 4 of 33
Ver. 1.0
Slide 5 of 33
Ver. 1.0
Name of an Interface
Slide 6 of 33
Ver. 1.0
Slide 7 of 33
Ver. 1.0
Slide 8 of 33
Ver. 1.0
@Stateless
Calculator
public int
return a +
}
public int
return a -
Slide 9 of 33
Ver. 1.0
Slide 10 of 33
Ver. 1.0
Annotation
Applies To
Description
Stateful
Stateless
Local
Remote
Remove
Stateful session
bean class
It is used to denote
a remove method of a stateful session
bean.
Slide 11 of 33
Ver. 1.0
Slide 12 of 33
Ver. 1.0
Slide 13 of 33
Ver. 1.0
Slide 14 of 33
Ver. 1.0
Slide 15 of 33
Ver. 1.0
Slide 16 of 33
Ver. 1.0
Slide 17 of 33
Ver. 1.0
Slide 18 of 33
Ver. 1.0
import javax.ejb.*;
import javax.annotation.*;
@Stateful
public class BankingBean implements Bank
{
@Resource private javax.ejb.SessionContext context;
}
Slide 19 of 33
Ver. 1.0
Slide 20 of 33
Ver. 1.0
Slide 21 of 33
Ver. 1.0
Slide 22 of 33
Ver. 1.0
Slide 23 of 33
Ver. 1.0
Slide 24 of 33
Ver. 1.0
Slide 25 of 33
Ver. 1.0
Slide 26 of 33
Ver. 1.0
Slide 27 of 33
The following steps are used for creating a client that uses
container services:
Use the injection services of the container to obtain a
reference to the session bean object.
Invoke the required services of the session bean object.
Ver. 1.0
Slide 28 of 33
Ver. 1.0
Slide 29 of 33
Ver. 1.0
Slide 30 of 33
Ver. 1.0
Slide 31 of 33
Ver. 1.0
Slide 32 of 33
Ver. 1.0
Slide 33 of 33