Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

BMP and CMP in entity Beans?

 
scott miles
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have not worked on enity beans but went thru some articles on net. I get bit confused about the CMP and BMP Terms. they are here:-

1)We use the term BMP and Cmp in context of Entity bean only. Correct?

2)In CMP we don not write any JDBC code they are done Developer just provides the mapping info at deployment time. Does container internally uses JDB apis only?

3)Third is In BMP we write the JDBC code to persiste the data, Then is there any use of enity bean here? We can do the same in session beans also.

 
Jayr Motta
Ranch Hand
Posts: 110
Google App Engine Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're really in 2011? We don't use it anymore. JPA FTW!
 
Madhan Sundararajan Devaki
Ranch Hand
Posts: 312
Java MS IE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please find below answers to your questions.

1. Yes
2. Yes
3. Session Beans are used to handle transactions, while Entity Beans are used to persist data in a Database. This is the standard use of such Beans.

 
scott miles
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a question on 3rd point if in a session bean we are using jdbc for persistence , can we call it Bean Managed persistence?
 
Jayr Motta
Ranch Hand
Posts: 110
Google App Engine Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no such concept once the container managed persistence was banished, persistence is always bean managed and supported by the container.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!