Tuesday, October 14, 2008

difference b/w EJB2.1 and EJB3.0

EJB3.0
  1. No need of Home Interface (EJBHome),but it is needed in EJB2.0
  2. No more confusions to make an EJB remote or local,it's the client which would decide and cast to appropriate.
  3. Just write SINGLE simple Java class and annotate it to be Stateless/Stateful/Entity/MessageDriven.Container
  4. No Deployment Descriptors , MetaData Annotations are explored which is introduced in J2SE5.0
  5. Forget all EJB life cycles.For example Entity bean life cycle in 3.0 is new,managed,detached,removed.
  6. Ejb 3.0 siplifies the developement of the application

    Ready to develop complex query,inner/outer join with EJB3.0.
The main difference lies in the persistence In case of EJB 3.0 there is JPA Java persistence API which makes the mapping of EntityBeans with the database easy with the help of a service called as EntityManager.

Mapping is done with the help of annotations unlike in EJB2.0.
Home interfaces are eliminated.
Deployment descriptors are an option in EJB 3.0.
EJB3.0 also supports webservice client through SOAP and WSDl.

Finally, concluding this topic I think the main difference is that EJB 3.0 is moved towards annotations based programming model and dependency injection to make our life easy . 



For more information please visit http://javaknowledgestorm.blogspot.com/2009/04/differences-between-ejb20-and-ejb30.html

4 comments:

Anonymous said...

Well I assent to but I think the collection should secure more info then it has.

Anonymous said...

Brim over I acquiesce in but I dream the brief should acquire more info then it has.

Ujjwal Soni said...

I'll soon add more information regarding this.

Anonymous said...

I wish not agree on it. I over warm-hearted post. Particularly the appellation attracted me to review the whole story.