File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes CMP vs BMP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "CMP vs BMP" Watch "CMP vs BMP" New topic
Author

CMP vs BMP

s khosa
Ranch Hand

Joined: May 15, 2003
Posts: 72
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

Joined: Feb 12, 2001
Posts: 93
Repeated question, I am not moderator; but I would suggest you not to post same question multiple time.
Anwar Jamshed
Greenhorn

Joined: Feb 13, 2006
Posts: 2
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.


single best thing an ideal programmer can wish for is the ability to communicate his code.
 
 
subject: CMP vs BMP