• 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

CMP Vs BMP Which one is better

Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) Which one is better CMP or BMP??
2) Performance wise which one is better ???
3) Is there any limitations/restrictions for CMP & BMP ?
4) In which situation we need to use CMP.
5) In which situation we need to BMP.

Are you saying the container generates database access code & take care of everything while using CMP entity bean && Once you use BMP entity bean we need to write code for everything(like database & Transaction etc).

So it will reduce the development time if we use CMP.
In this case CMP is better than BMP okay. I agree this

But my doubt is, we can write our own BMP code that to make better performance than CMP right ? atleast any one Java expert can do this right.
In this case, shall we say BMP is better than CMP???

could me tell me?? any other difference is there between CMP & BMP??
or When will CMP fails and when will BMP fails???

If you are using CMP in your project/product why did you choose that??

Thanks & Regards
Dhinesh Kumar R
author & internet detective
Posts: 41083
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nothing is inherently better than something else. It depends on the circumstances. That said, I think almost all circumstances are better to use CMP. For the rare cases that BMP would be better, I would favor using a non-entity bean solution (another framework or raw JDBC.) Also note that BMPs are not in JEE 5. New code should not be developed using BMP because there is no migration path.

There is a huge cost to using BMP. You should have a demonstrated performance problem before saying you are using BMP to increase performance.

We are using CMP, but not exclusively. We choose a technology based on the project and scenario. There is not an "always use CMP" rule. We never use BMP for the reasons described above.
That new kid is a freak. Show him this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
    Bookmark Topic Watch Topic
  • New Topic