Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

CMP vs BMP - Performance  RSS feed

 
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?

A When performance is essential and you are storing standard data types.

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

C When performance is essential and you are storing complex data types.

D When 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
 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I assumed, storing complex data types as db access, if my assumption is correct,
Ans C & D is not possible. CMP in EJB 1.1 is not good choice for Complex db. Sun made huge change for CMP in EJB2.0 to access db.
Please let me know if I am wrong.
Regards.
[ March 02, 2006: Message edited by: sanjeev mehra ]
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, B is correctly identified by you as the correct answer.

The reason D is not the correct answer is because it has been assumed everywhere in the SCEA exam that with CMP, complex data types are difficult to manage. The mantra for the exam is - when its simple, go with CMP, when it gets complex, use BMP and do the plumbing yourself!

Thank goodness for EJB 3.0



Originally posted by s khosa:
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?

A When performance is essential and you are storing standard data types.

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

C When performance is essential and you are storing complex data types.

D When 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

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!