Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on BMP

 
Sandeep Lodhia
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,
How BMP Reduces your ability to move your EJB from one App server to another?
Pls explain !!!
Thanks
Sandeep
[ June 07, 2002: Message edited by: Sandeep Lodhia ]
 
SJ Adnams
Ranch Hand
Posts: 925
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a great question
The BMP EJB removes custom (vendor specific) Database code from your application. This means that you can switch from an MS SQL Sever backend to an Oracle backend easily.
..However if you want to switch from iPlanet to WebSphere you will need to make changes to your application descriptor and maybe more?
Had you used CMP then switching databases may require work (changes to PreparedStatements etc), but if you switch AppServer things should be quite simple.
In my experience data is just like mud, where it lands it sticks. So migrating databases is uncommon, however changing AppServers (especially because of opensource & Oracle 9i coming with a bundled appserver) is a possibilty.
You should have a good understanding of choosing BMP/CMP for part 1 and part 3.
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually Simon you got it backwards.
BMP will usually require work when switching databases unless you are using some O/R mapping tool like Cocobase or TopLink. BMP is relatively easy to move between Application Servers since you typically only need to write one vendor specific descriptor per BMP.
CMP should transparently work with all databases supported as CMP sources by your Application Server. CMP is a much bigger hassle to move between Application Servers since there is usually an additional vendor descriptor for the CMP stuff. This descriptor is typically fairly complex and it definitely not something you write by hand. This is where good tools definitely come into play.
Regardless of BMP or CMP, if you are using a tool like XDoclet then it should be pretty easy to switch Application Servers.
 
Sandeep Lodhia
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my limited knowledege.Pls chek me if i m wrong.
In BMP, I'd use DAO...this culd make porting across database little easier.
However,In BMP, the deployment discriptor wuld not need much mapping information as it wuld be done in bean.
So I guess porting across App server shud be easier in BMP
I agree with Chris tht CMP porting is difficult as it wuld depend on vendor
What are ur opinions???
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BMP is always going to be harder to port across databases. CMP is designed to be database independent, in BMP you manage your own persistence.
If you use ANY non-standard SQL code in the BMPs then it will need to be changed between databases and you can't write a real application without using some non-standard SQL code.
DAO helps to ease the database migration pains but that doesn't mean that they don't exist.
 
Sandeep Lodhia
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still the basic question....How BMP Reduces your ability to move your EJB from one App server to another?
Infact in BMP, code is not much dependent on container i.e the App Server. Hence with BMP, porting from one App Server to another shud be easy.
Am I right?
 
Chana Campos
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aha - one of my favorite discussions! BMP and CMP! Hey guys, databases are NOT the "black boxes" we think they are - EVERY vendor implements SOMETHING differently - even the JDBC driver you use can make a difference in functionality - use WLS jDriver for Oracle and you get performance but lose Oracle-specific enhancements for managing ResultSets, etc.- it goes both ways. And ANSI-SQL has four different levels of implementation - and ALL of the big vendors implement it somewhat differently...
As far as BMP goes - STAY AWAY! It dramatically and hugely increases the amount of code you have to write, it's usually buggy, you lose caching and some pooling abilities, the ability to use EJB relationships (which are great), security can become nasty and maintenance is going to be frightful. The performance gains of CMP are significant...most of the companies that I work with having been using CMP since 4.0 - and they love it. The portability iossue is significant because of the different ways that vendors implement the very same functionalities - it won't be a simple "swap of the JDBC driver" by a long shot.
If you "can't" use CMP - re-think your design - you're losing half the power of the app server.
Be creative - create updatable views, use CMR creatively. You'll be happy you did.
Cheers,
Chana
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic