Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Joe Ess

CMP Vs BMP Which one is better  RSS feed

Posts: 28
  • Mark post as helpful
  • send pies
  • 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: 38504
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!