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 How BMP Reduces your ability to move your EJB from one App server to another ??? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Architect Certification (SCEA/OCMJEA)
Reply Bookmark "How BMP Reduces your ability to move your EJB from one App server to another ???" Watch "How BMP Reduces your ability to move your EJB from one App server to another ???" New topic
Author

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

Sandeep Lodhia
Ranch Hand

Joined: Oct 09, 2000
Posts: 105
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

Joined: Sep 28, 2001
Posts: 925
I think the answer is it doesn't. Having done this in the past iPlanet -> Orion it was quite easy.
Sandeep Lodhia
Ranch Hand

Joined: Oct 09, 2000
Posts: 105
Thanx Simon.I agree with u.
Any other different opinions???
Alexander Yanuar Koentjara
Ranch Hand

Joined: Jun 03, 2002
Posts: 31
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 ]

===================================<br />Fear not, God know the best.<br />SCJP2 91%<br />SCWCD 89%<br />SCJD2 92% (143/155 pts)<br />SCEA Part I (89%)
Alexander Yanuar Koentjara
Ranch Hand

Joined: Jun 03, 2002
Posts: 31
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 ]
Sanjay Raghavan
Ranch Hand

Joined: May 14, 2002
Posts: 148
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.


Sanjay Raghavan<br />SCJP2, SCEA-J2EE<br />Moderator - <a href="http://groups.yahoo.com/group/scea_prep" target="_blank" rel="nofollow">SCEA PREP</a><br />Co-Author - <a href="http://www.whizlabs.com/scea/scea.html" target="_blank" rel="nofollow">SCEA@Whiz</a><br /><i>Where did you sip your Java Today?</i>
 
 
subject: How BMP Reduces your ability to move your EJB from one App server to another ???
 
Threads others viewed
BMP and CMP
How BMP Reduces your ability to move your EJB from one App server to another?
Doubt on Ian's Moc Exam EJB question ???
A mock exam question
Question on BMP
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture