Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

CMP vs BMP  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?

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
  • 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
  • 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
Boost this thread!