|
Lines 55-62
Link Here
|
| 55 |
<dl> |
55 |
<dl> |
| 56 |
<dt class="dlterm">State type</dt> |
56 |
<dt class="dlterm">State type</dt> |
| 57 |
|
57 |
|
| 58 |
<dd>A session beans are divided in two types: stateless session beans and |
58 |
<dd>There are three types of session beans: stateless, stateful and singleton. <dl> |
| 59 |
stateful session beans.<dl> |
|
|
| 60 |
<dt class="dlterm">Stateless session beans</dt> |
59 |
<dt class="dlterm">Stateless session beans</dt> |
| 61 |
|
60 |
|
| 62 |
<dd>A stateless session bean is a collection of related services, each represented |
61 |
<dd>A stateless session bean is a collection of related services, each represented |
|
Lines 76-81
Link Here
|
| 76 |
data to and from this conversational state, which is shared among all methods |
75 |
data to and from this conversational state, which is shared among all methods |
| 77 |
in the bean. Stateful session beans have timeout periods.</dd> |
76 |
in the bean. Stateful session beans have timeout periods.</dd> |
| 78 |
|
77 |
|
|
|
78 |
<dt class="dlterm">Singleton session beans</dt> |
| 79 |
|
| 80 |
<dd>A Singleton session bean is a session bean component that is instantiated |
| 81 |
once per application. In cases where the container is distributed over many virtual |
| 82 |
machines, each application will have one bean instance of the Singleton for each JVM. |
| 83 |
Once instantiated, a Singleton session bean instance lives for the duration of the |
| 84 |
application in which it is created. It maintains its state between client invocations |
| 85 |
but that state is not required to survive container shutdown or crash. A Singleton |
| 86 |
session bean is intended to be shared and supports concurrent access.</dd> |
| 87 |
|
| 79 |
</dl> |
88 |
</dl> |
| 80 |
</dd> |
89 |
</dd> |
| 81 |
|
90 |
|
|
Lines 88-94
Link Here
|
| 88 |
bean's business interface can be passed as a parameter or as a return value |
97 |
bean's business interface can be passed as a parameter or as a return value |
| 89 |
of a business interface method. It contains methods to initialize a session |
98 |
of a business interface method. It contains methods to initialize a session |
| 90 |
bean's state and to notify the EJB container when the reference is no more |
99 |
bean's state and to notify the EJB container when the reference is no more |
| 91 |
needed and can be removed. The business interfaces are two types:<dl> |
100 |
needed and can be removed. There are several options available:<dl> |
| 92 |
<dt class="dlterm">Remote business interface:</dt> |
101 |
<dt class="dlterm">Remote business interface:</dt> |
| 93 |
|
102 |
|
| 94 |
<dd>The client can run on a different machine or different Java virtual |
103 |
<dd>The client can run on a different machine or different Java virtual |
|
Lines 101-106
Link Here
|
| 101 |
<dd>The client must run on the same Java virtual machine as the bean it accesses |
110 |
<dd>The client must run on the same Java virtual machine as the bean it accesses |
| 102 |
and the location of the enterprise bean is not transparent.</dd> |
111 |
and the location of the enterprise bean is not transparent.</dd> |
| 103 |
|
112 |
|
|
|
113 |
<dt class="dlterm">No-interface:</dt> |
| 114 |
|
| 115 |
<dd>This is a variation of the Local view that exposes the public methods of the |
| 116 |
bean class without the use of a separate business interface.</dd> |
| 117 |
|
| 104 |
</dl> |
118 |
</dl> |
| 105 |
</dd> |
119 |
</dd> |
| 106 |
|
120 |
|