Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Whether to use BMP or CMP  RSS feed

 
Damanjit Kaur
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am wondering about the cases when we should use BMP and when CMP. I know CMP is maintained by container, we have to write less code.

Could it be that we should use CMP because :

- Persistence which means synchronizing the state of fields in Bean with the corresponding table fields in database, in CMP it is maintained by Container, whereas for BMP it is not.

Also Can anyone tell me how the join relationship for say 2 or more tables is implemented in CMP beans.
 
Yashar Kalantari
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Damanjit

choosing between cmp and bmp is not an easy task. they both has benefits and disadvantages of their own. I suggest you take a look at the ebook, Mastering EJB available on http://theserverside.com/books/wiley/masteringEJB/index.tss
there is whole chapter named as "choosing between BMP and CMP" in there.

good luck
 
Damanjit Kaur
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Yashar

thanks for this reference!!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!