• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

BMP + DAO or CMP ?????

 
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic