• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

CMP/BMP Platform independant??

 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well there has been a late of controversy within my group regarding the Platform independancy of CMP and BMP.
the two points here are.
1. CMP is platform independant based on the fact that they take more deployment time as on changing the app server the deployment descriptors have to be varied.
2. BMPs are DB dependant.
Could someone throw some light on this please.
Thanx in advance.
Prince of Pune.
 
sharp shooter, and author
Posts: 1913
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here are a few threads that contain some useful information...
https://coderanch.com/t/309790/EJB-JEE/java/CMP-over-BMP
https://coderanch.com/t/309858/EJB-JEE/java/Perils-Merits-EJB
https://coderanch.com/t/309856/EJB-JEE/java/BMP-CMP-Arch-mistake
CMPs (with their deployment descriptors) are application server dependent, but I wouldn't say that BMPs are database dependent - not unless you specifically use DB specific features anyway.
Simon
 
Rohit Ahuja
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That did'nt help.
 
Author
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

1. CMP is platform independant based on the fact that they take more deployment time as on changing the app server the deployment descriptors have to be varied.


This is true. It does take a lot more deployment.
Although if you use XDoclet, this becomes less true. The advantages of CMP/CMR and EJB QL outweigh the extra deployment information needed.
What is your question?


2. BMPs are DB dependant.


I would say much more so than CMP. In the BMP case, the independence is left up to you. On a large project, you will see less than 5% SQL code that you will have to maintain the differences (in my experience for the BMP case). There are some limits to CMP and there will be times when you have to use BMP. But the benefits of CMP outweigh the difficulties.
For new projects, I strongly recommend tyring out CMP.
Please read this link....
: EJB 2.0: EJB QL + XDoclet = using EJB on more projects!


Of particular interest in developer productivity with EJB is CMR, EJB QL and XDoclet (EJBDoclet). Basically, the productivity and utility of these tools have to exceed the inherent difficulties in using EJB in order for EJB to be considered on a project. These tools lower the bar while increasing the utility and make more projects candidates for EJB.

XDoclet, and open source project, simplifies EJB development by using JavaDoc API and some additional APIs as a code generator so that a developer only has to maintain one file instead of 5 or more files (,i.e., deployment descriptor, local interface and/or remote interface class files, local home and/or remote home class files, vendor deployment descriptors and/or conf files, bean implementation, primary key class files, value class files and more.)

There is a significant increase in productivity by using select methods and EJB QL. Code that use to take 10, 20, 30 lines of code can be written in just a few lines of code by mastering EJB QL.

When you combine XDoclet simplification with EJB-QL and CMR, you can use EJB on a lot more projects.

With CMR it is really easy to work with the standard collections API (which we all know and love) when dealing with one-to-many and many-to-many relationships between entities.
...
If you have not tried CMR or EJB QL, I wrote a tutorial on CMP/CMR and EJB QL that I think you should check out. The tutorial is on IBM developerWorks. Please go to this
link to find out more information on this tutorial series and related articles.

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic