• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CMP vs BMP

 
s khosa
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

What would be answer to this question:

You are designing an Enterprise Application to provide a way for customers to buy products from many companies through one standard site. The application servers you have use the EJB specification 1.1. You have a customer bean and are not sure whether to use CMP or BMP. When should you use CMP?

AWhen performance is essential and you are storing standard data types.

BWhen performance is not essential and you are storing standard data types.

CWhen performance is essential and you are storing complex data types.

DWhen performance is not essential and you are storing complex data types.

I think performance wise, BMP is better than CMP. Also, in CMP if we use PrimaryKey class we can use object mapping to create complex object types.
So it could be B and D.

But correct answer is B.

Any comments?

Thanks
 
sanjeev mehra
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Repeated question, I am not moderator; but I would suggest you not to post same question multiple time.
 
Anwar Jamshed
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The application server is using the EJB 1.1 specs. So the context this question positions itself in is clear enough.
Containers are yet not sophisticated to the point of doing this mapping efficiently.
Additional note:
While, the promise of encapsulating the queries in an access object is that you have 'loose coupled' your entity beans with the data query, insert and update chores. Complex data types needs additional scrutiny of this access object code. Ofcourse the tradeoff here is that you make your queries more efficient manually, plus the management overhead of life cycles of objects in your application.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic