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...
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...
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
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."
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
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.
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.