• Post Reply Bookmark Topic Watch Topic
  • New Topic

A question for the authors

 
Rick Buitrago
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings

I would like to ask the authors:
Why did the CMP (and BMP) disappeared from this version of the spec? Is it that OR mapping tools like TopLink/Hibernate finally prevailed by favouring the POJO model over the heavier, but more structured and well known Entity EJB role?

thanks, I would like a print copy of your book, I read the intro of the first chapter and I want to learn more about what the technology has to offer still.
 
Debu Panda
author
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JPA entities replaced the EJB 2 CMP entity beans. CMP entity beans were complex to develop, not really portable and were not scaling upto expectations. Hibernate and TopLink eclipsed popularity of EJB 2 and EJB 3 standardizes POJO persistence that was long overdue. Note that both EJB 2 BMP and CMP are still supported with EJB 3 as requirement for backward compatibility and hence your applications will continue to run.
 
Reza Rahman
author
Ranch Hand
Posts: 580
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rick:

As you probably already know, its not that the concepts behind EJB 2 Entity Beans were bad per se. Indeed, from a purely theorical standpoint, having persistent entities that are managed by the container, remotely managed and highly synchronized does sound pretty compelling.

Besides the haevy-weight model of EJB 2 in general, the biggest problem with Entity Beans in particular were that they were overkill. No one that I know of really remotely acceses Entity baens. As Debu mentioned, Entity Baens also suffered from portabilty issues becuse the EJB 2.x spec left so many gaps open. Arguably another big problem with Entity Beans is that they locked you into a record-based higly procedural model.

Once you get to play around with JPA a little more, you might be pleasantly surprised as to how fun and easy to develop they are. All in all, I think the leaving behind of the Entity Bean model is not that big of a loss...

Reza
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why is that people realised rather late that EJB 2.x was bad model ?
 
Reza Rahman
author
Ranch Hand
Posts: 580
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pradip:

Speaking in particular about EJB 2 Entity beans, I think the realization has been there for quite a while. It's just that there weren't many viable alternatives around.

As to EJB 2 in general, I think it has a little to do with the natural evolution in a mature technology with a large customer base and the fact that innovation sometimes takes time and proper impetus.

For EJB 3, annotations have probably been the watershed innovation.

Reza
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!