Win a copy of Grokking Bitcoin this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

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

 
What's wrong? Where are you going? Stop! Read this tiny ad:
ScroogeXHTML - the small and fast RTF to HTML converter library
https://coderanch.com/t/707504/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!