• 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

Whether to use BMP or CMP

 
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Yashar

thanks for this reference!!
 
It's fun to be me, and still legal in 9 states! Wanna see my tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic