Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Part II : CMP Vs Session Bean and DAO

 
Sudhansu Pati
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I read the following discussion about CMP Vs Session Bean and DAO.

http://www.coderanch.com/t/149754/java-Architect-SCEA/certification/DAO-SCJEA-Assignment

Does CMP really introduce manageability issues and has a tight coupling with the Database ?

I thought BMP had those issues. In BMP you basically have to write the SQL queries within the entity bean itself. The only benefit of using using BMP is you may get faster performance and it is easier to work with complex datatypes using BMP.

But with the EJB 2.0 specifications, you can create CMR between multiple tables. Almost every application server today support caching mechanism and connection pooling which makes the database operations from the application server to the Database is even faster.

In the Part II assignment, I have seen everyone using DAO and session bean. I think it is probably easier for the assignment purpose so that you don't have to show so many entity beans and the relationship between them.
But would you really recommend someone to use Session Bean and DAO for a real project ?

Another quick question is, if I use CMP entity beans, how do I show their relationship in the Sequence Diagram ?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic