|
EJB 3.0
|
|
What is new in EJB 3.0?
Now, have a look over the new features of EJB
3.0 that achieved some simplicity over the
previous EJB APIs in various ways:
1. EJBs are now Plain Old Java Objects
(POJOs) 2. No need of home and object interface.
3. No need of any component interface.
4. Unnecessary artifacts and lifecycle
methods are optional
5. Use of java annotations instead of using
XML descriptors
6. Use of dependency injection to simplify
client view
7. Simplify APIs to make flexible for bean’s
environment
8. Defaults are assumed whenever possible
Types of EJB
There are three different types of EJB that are
suited to different purposes:
• Session EJB—A Session EJB is useful
for mapping business process flow (or
equivalent application concepts). Session EJBs commonly represent “pure”
functionality that is created, as it is
needed.
|
|
Entity EJB—An Entity EJB maps a
combination of data (or equivalent
application concept) and associated
functionality. Entity EJBs are usually
based on an underlying data store and
will be created based on that data within
it.
• Message-driven EJB—A Messagedriven
EJB is very similar in concept to a
Session EJB, but is only activated when
an asynchronous message arrives. Session Bean on EJB Container
Session beans are divided into two parts. • Stateless: A session bean is the
enterprise bean that directly interacts
with the user and contains the business
logic of the enterprise application. A
session bean represents a single client
accessing the enterprise application
deployed on the server by invoking its
method. An application may contain
multiple sessions depending upon the
number of users accessing to the
application.
• Stateful: These types of beans use the
instance variables that allow the data
persistent across method invocation
because the instance variables allow
persistence of data across method invocation. The client sets the data to
these variables, which he wants to
persist. Stateful session beans have the
extra overhead for the server to
maintain the state than the stateless
session bean.
|
|
Jan 2008 | Java Jazz Up | 16 |
|
|
|
View All Topics |
All Pages of this Issue |
Pages:
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53 ,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63 ,
64,
65 ,
66 ,
67 ,
68 ,
69 ,
70 ,
71 ,
72 ,
73 ,
74 ,
75 ,
76 ,
77 ,
78 ,
79 ,
80 ,
81 ,
82 ,
83,
84 ,
85 ,
86,
87 ,
88,
89 ,
90 ,
91 ,
92 ,
93 ,
94 ,
95 ,
96 ,
97 ,
98 ,
99 ,
100 ,
101 ,
102 ,
103,
104 ,
105 ,
106,
107,
Download PDF |
|
|
|
|
|
|
|
|
|