• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

CMP vs BMP

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Repeated question, I am not moderator; but I would suggest you not to post same question multiple time.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic