Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

To the author: SCBCD Exam Study Kit

 
Mathew Sam
Ranch Hand
Posts: 124
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please describe some specific scenarios where BMP should be used?
For join queries can we use CMP 2.0 ? Does Containers supports mapping in this case?
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please describe some specific scenarios where BMP should be used?

BMP is seldom use and according to HF EJB, there are rare cases that you can make use of BMP. Might be you must have specific transactions that are break into several level, and each level must commit certain data, and when exception occurs in 1 transaction do NOT require to rollback other transactions, while this happened for a particular transction, you then have to implement your own transaction management logic.


For join queries can we use CMP 2.0 ? Does Containers supports mapping in this case?

Yes, CMR - Container Managed Relationship is aimed to provide this support, to link up various tables using Entity Beans.

Nick
 
Paul Sanghera
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mathew Sam:
Could you please describe some specific scenarios where BMP should be used?
For join queries can we use CMP 2.0 ? Does Containers supports mapping in this case?


Mathew:
As Nick said, for sake of robustness and to reduce the development time, it's always a good idea to use CMP, and CMP works pretty well in EJB 2.0. However, BMP does offer you more flexibility. There may be situations where you may need to use BMP (that's why BMP option is there), for example consider the situation when the data storage you are using is not supported by CMP (e.g. you are dealing with the data that exists in an application rather than the database).
So, the bottom line is, use CMP whenever you can.
Cheers.
Paul
Book website
http://www.manning.com/sanghera
 
Siripa Siangklom
Ranch Hand
Posts: 79
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Could you please describe some specific scenarios where BMP should be used?
For join queries can we use CMP 2.0 ? Does Containers supports mapping in this case?


CMP is not portable across app servers but supports DB portability. BMP supports Application Server portability.

Siripa
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic