• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

BMP + DAO or CMP ?????

 
Luciano Queiroz
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys!

Which path should I follow:

- BMP + DAO
- CMP




I'm still so confused about this decision!
In my opinion CMP won't be able to satisfy the performance requirements.
But some people in this forum has adopted CMP because it's easier to control the relationships between tables.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think DAO can be used no matter BMP or CMP.

For BMP, your DAO maybe responsible DB connectivity via JDBC.
For CMP, your DAO maybe responsible DB connectivity via Entity Bean.

If the exam is focus on EJB 1.1, I feel BMP seems better, as at that time, CMP is sucks! However, nowadays, CMP in EJB 2.0 has been improved a lot (although there are still lots of problems while comparing to EJB 3.0 draft), thus CMP seems a better choice.

Nick
 
Parag Doshi
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If we use CMP, why do we need DAO? As the persistence is going to be maintained by the container, I do not need additional abstraction for my DB layer..

those are my thoughts, ofcourse, which could be wrong

Parag
 
Luciano Queiroz
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found this:

"Users in the field claim CMP is slower in high volume transaction situations. So if your database access requires custom tweaking, you'll need bean-managed persistence."

"So, if you need to know exactly what happens when your database is updated, want to maintain control while changing to your data source, or simply need to tweak database access to achieve performance gains, then BMP is probably for you."
 
Luciano Queiroz
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think CMP would satisfy the performance requirements.
Take a look at the interview and see the desired response time and the expectation of simultaneous users. Can CMP achieve that??? With only 1 application server running? Which scalability will be available with only 1 machine??? I don't trust in CMP.

I choose BMP, based in self experience.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic