• Post Reply Bookmark Topic Watch Topic
  • New Topic

CMP Vs BMP Which one is better  RSS feed

 
Dhineshkumar raj
Greenhorn
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
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37395
531
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dhinesh,
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!