Previous Page | Next Page

  1. Introduction
  2. Learning Objectives
  3. About the Author
  4. Thank you note
  5. Component Technology
  6. Component Characteristics
  7. Component P O E
  8. Deployable Component
  9. Reusable Components
  10. Shareable Components
  11. Distributable Components
  12. SelfContained Components
  13. Standard Infrastructure Needs
  14. Application Servers
  15. Object Pooling
  16. Directory of Application Servers
  17. Container
  18. J2EE overview
  19. J2EE 1.4 APIs
  20. Enterprise JavaBeans Model
  21. EJB Overview
  22. When to use EJB
  23. Java Naming and Directory Interface
  24. EJB Specification
  25. EJB Roles
  26. EJB Design Approaches
  27. EJB Architecture
  28. EJB Flow Chart
  29. Client View of EJB
  30. EJB Client
  31. EJB Home Interface
  32. EJB Remote
  33. EJB Implementation
  34. Session Context
  35. Stateless Session EJB
  36. Stateless Session EJBs View
  37. Life Cycle of Stateless Session Bean
  38. Stateful Session EJBs View
  39. Life Cycle of Stateful Session Bean
  40. Stateful vs Stateless
  41. Entity Bean
  42. BMP Entity EJBs
  43. Primary key class
  44. Shared Entity Bean
  45. Life Cycle of BMP Entity Bean
  46. CMP Entity EJBs
  47. Life Cycle of CMP Entity Bean
  48. BMP vs CMP
  49. Message Driven Bean
  50. Message Driven EJBs
  51. Life Cycle of Message Driven Bean
  52. Deployment
  53. Other interfaces and classes
  54. Exceptions
  55. Example 1
  56. Steps to Develop an EJB
  57. Hello World Object Model using RMI
  58. Hello World Object Model using LOCAL
  59. HelloBean Home Interface
  60. HelloLocalHome Interface
  61. HelloBean Remote Interface
  62. HelloLocal Interface
  63. The Bean Class
  64. The Deployment descriptor
  65. The Client
  66. EJB Jar File
  67. EJB Application Assembler
  68. Example 2
  69. Stateful Session Remote Interface
  70. Stateful Session Home Interface
  71. Stateful Session Bean Class
  72. Stateful Session Bean Class
  73. Stateful Session Bean Class
  74. Stateful Deployment Descriptor
  75. Stateful Deployment Descriptor
  76. Stateful Deployment Descriptor
  77. Stateful Session Client
  78. Stateful Session Client
  79. Book Exception
  80. ID Verifier
  81. All Examples
  82. Component Comparison
  83. Component Comparison
  84. Component Comparison
  85. Component Comparison
  86. Component Comparison
  87. Component Comparison
  88. Component Comparison
  89. Component Comparison
  90. Component Comparison
  91. Conclusion
  92. References
  93. Finish

47. BMP vs CMP

Bean Managed Persistance

BMP offers a tactical approach

The developer takes care of handling persistence

BMP uses hard coded queries so we can optimize our queries

Container Managed Persistance

CMP is more strategic

Vendor takes care of everything by using O-R or OODB mappings using metadata.

A developer cannot optimize performance as the vendor takes care of it

We should start developing CMP beans, unless we require some kind of special bean, like multi-tables, that cannot be completely realized with a single bean. Then when we realize that we need something more or that we prefer handling the persistence (performance issue are the most common reason), we can change the bean from a CMP to a BMP.

Method by method comparison can be seen in EJB20Matrix.doc at

Copyright 2004 Kanti Prasad All rights reserved