How BMP Reduces your ability to move your EJB from one App server to another ???

Sandeep Lodhia

Ranch Hand

Posts: 105

posted 14 years ago

HI Guys, Can any one pls explain ow BMP Reduces your ability to move your EJB from one App server to another ??? Pls note that it is about performance of App Server AND NOT DATABASE SERVER !!! So kindly DONT give explanation on BMPs porting across different databases !!! Thanx Sandeep

SJ Adnams

Ranch Hand

Posts: 925

posted 14 years ago

I think the answer is it doesn't. Having done this in the past iPlanet -> Orion it was quite easy.

Sandeep Lodhia

Ranch Hand

Posts: 105

posted 14 years ago

Thanx Simon.I agree with u. Any other different opinions???

Alexander Yanuar Koentjara

Ranch Hand

Posts: 31

posted 14 years ago

I (just another beginner) feel that ... BMP increase the container compability, as long you use the same database vendor, you may need to modify a little piece of XML in container's specific deployment descriptor. CMP increase the database compability, and you will not bother about what type/vendor of database (RDBMS or ODBMS) which will be used, but the pain will be the container's specific deployment descriptor. Developer need to declare the field mapping at the end. But I think this is a better approach since editting descriptor won't be as painful as editing java source code and recompile them (which may introduce you new bugs).. This is very interesting, I hope an expert can give explaination? thanks! [ June 12, 2002: Message edited by: Alexander Yanuar Koentjara ]

Another thing is, BMP is needed if you implement the ejbStore/ejbLoad/finder/create which uses source other than database, example: LDAP, flat file, socket/network, etc. (I get this from an article, but forgot the url) And, you mention about "performance" ... from the article, it said that now the ejb containers are smart+optimized enough to perform the effective store and load stuff. So, "optimization" is not a reason to use BMP anymore. And, the article stated that good containers even can greatly improve the performance when using CMP rather than BMP. They use some kind of caching (I forgot).. [ June 12, 2002: Message edited by: Alexander Yanuar Koentjara ]

If it is strictly about performance... EJB 1.1 In CMP the mapping tools may not be sophisticated enough to handle complex join mapping. You may not get well optimized SQL and may take a performance hit. In BMP, if you have a complex join based query, your developer may not have the DB side expertise to come up with the best SQL. Again you could take a performance hit. However given the choice, for complex joins, it is preferrable to go with BMP with DAO. Reason: In BMP you can always use Stored Procs. A. The code is precompiled and optimized. B. The DBAs can do their explain plan to see what indexes are being used and determine to either change the where clause sequence or add appropriate indices. The developer is decoupled from this, since he/she would code to the interface of the SP. Other than that there are no guarantees that one will perform better than the other. EJB 2.0 EJB 2.0 compliant containers have to have better tools to provide adequate complex mapping support. That may increase the performance. Further the use of the new query language (ejbql? or something) gives a db independent QL and could reduce the pain of portability. However EJB 2.0 is still new so we will have to wait and see if CMP becomes the preferred choice now. Remember with EJB 1.1, the use of BMP + DAO was recommended for easy conversion to CMP in the future. HTH.