• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

One WHIZLabs Question

 
Chen ZhiJiang
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q:
You are designing a enterprise applications to provide a way for customer to buy ...
The application server you have use the EJB 1.1 specification, you have an customer bean and not sure use BMP or CMP. When should you use CMP?
A:
When performance is not essential and you are storing standard data type..
I'confuse with performance, is performance in CMP is better than BMP???
Maybe the correct answer is:
When performance is essential and you are storing standard data type..
Any one know the currect answer...
 
stara szkapa
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
CMP performance is not better then BMP performance therefore you should use CMP when performance is not essential. It is sort of obvious.
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think the choice between CMP and BMP is driven by performance. How can one perform better than the other? It beats me.
I think the choice between CMP and BMP is driven more by the maintainability part of the equation. BMPs are hard to develop and maintain because of SQL statements strewn all over the code. BMP is also less portable because SQL statements can some times get vendor specific. Conversely, CMP is easy to implement and maintain because you don't have to write SQL statements, but simply use a mapping tool at deployment. It is also more portable because if you change the database vendor, you simply remap the whole thing( well, in theory yes, but in practice it may not be that trivial )
So I guess it is just a wrongly worded question...
 
stara szkapa
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Citation from Designing Enterprise Applications with the J2EETM Platform, Second Edition
"Use bean-managed persistence when it is important that the application be very
finely tuned against the database that is in use."
 
Ian B Anderson
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
One of the problems with the current SCEA is the fact that it is an old certification and in some cases technologies have moved on since the questions were written - please give us an SCEA using EJB 2+
Anyway, the point in the question is that the SQL generated by App servers didn�t used to be very efficient and hence if you wanted to add any optimisation you should write you own SQL. However, as App servers have progressed so has their ability to generate efficient SQL. Now there is probably no difference between CMP and BMP in terms of performance (if anything CMP would be more efficient than BMP because the container can add even more optimisation).
But also the question says: �...storing standard data type�. Therefore CMP would be more suitable.
Good luck with the exam
Ian Anderson
 
Richard Carr
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Poor performance from CMP does seem to be an old idea.
In the second edition of Mastering EJB, Ed Roman writes "CMP entity beans, if tuned properly, are much higher performing than BMP entity beans."
Rich.
 
Chen ZhiJiang
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks very much
I'm going to take exam after tomorrow, good luck to me and every one.
 
funky fun
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Does anyone have an idea of approx. how much time does it take for Sun to assess the project assignement and get back to us with a result? This is considering that the 3rd exam of SCEA has been taken.
Kindly reply.
Zham lu.
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"funky fun"

Thanks for joining JavaRanch.
Unfortunately your name violates our naming policy. Please take a quick look at the rules and edit your profile accordingly.
Thank you!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic