what s the difference b/w EJB 2.0 and EJB 3.0 technically

Answers were Sorted based on User's Feedback



what s the difference b/w EJB 2.0 and EJB 3.0 technically..

Answer / amar

The major differences i have seen between EJB 2.x and EJB
3.0 versions are as follows :-

1). Removal of home interface enabled simple lookup process
in ejb 3.0

2). EJB deployment descriptors are not required in ejb3.0

3). Annotations are used in ejb3.0

4). EJB 3.0 entity beans don’t have home and remote interfaces.

5). EJB 3.0 entity beans/JPA becomes local. Remote
annotations are not at all supported for entity beans.

6). EJB 3.0 beans don’t implement the standard interfaces
like javax.ejb.SessionBean and hence no need to implement
the container call back methods like ejbActivate() etc

7). Query is very flexible. Multiple levels of joins are
enabled through the refined EJB-QL

8). Can be used with pluggable third party persistence providers

9). Security can be provided either through annotations or
through deployment descriptors

10). POJO like EJB 3.0 entities become lightweight and easy
to convert from a DAO to Entity bean or vice versa. Since
EJB 3 entities don’t need implement any interface.

Is This Answer Correct ?    61 Yes 7 No

what s the difference b/w EJB 2.0 and EJB 3.0 technically..

Answer / nidhi aggarwal

EJB 2.0 are very complex, difficult to learn/use. Uses
methods
like "ejbPassivate", "ejbActivate", "ejbLoad", "ejbStore".
Needs a deployment descriptor.

In EJB 3.0 methods
like "ejbPassivate", "ejbActivate", "ejbLoad", "ejbStore"
are removed. Annotations are provided. In EJB 3.0, we donot
need deployment descriptor. POJO(Plain old java object) are
introduced. For defining any relationship 1:1, 1:N, N:1,
M:N we have annitations.

Is This Answer Correct ?    42 Yes 9 No

Post New Answer

More EJB Interview Questions

What is entity bean in ejb?

0 Answers  


What are the advantages of java beam?

0 Answers  


What is the purpose of a transaction monitor?

1 Answers  


How does ejb container work?

0 Answers  


java doesnot support multiple inhetance. but a interface can support.how the ambiguities are rectified in interfaces?

2 Answers   CGI,






Is ejbCreate() method mandatory while defining a Session Bean?

0 Answers  


What is an entity manager?

0 Answers  


What do you mean by bean managed transaction?

0 Answers  


What is enterprise bean?

0 Answers  


Why should we use ejb?

0 Answers  


Differentiate ‘Stateful Session’ from ‘Entity Bean’ ?

0 Answers  


What is jar, war, and ear?

0 Answers  


Categories