• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Bean, CMP, CMT

 
Hank GU
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As we know that Entity Bean can be a CMP one or BMP one, I just read one line from whizlabs (the line is quotaed from Sun's tutorial), saying that "Entity Bean can use CMT, but Session Bean can use CMT or BMT".....
it leads to ====> BMP Entity Bean can only use CMT.....

I think that I mis-understand the CMP/BMP and CMT, can any1 explain a bit on that?

thanks a lot
 
Ray Ye
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
CMT container managed transaction
BMT bean managed transaction
Entity bean can only use CMT, whereas session bean can use both CMT and BMT.
 
Hank GU
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Ray. but I think I know the abbreviation behind, my question is more likely on "Why" BMP Entity Bean can only use CMT.....
 
Ray Ye
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In EJB1.1 Spec, Entity bean (either BMP or CMP) can only use CMT :-)
 
tomas suzuki
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my 2 cents...
I think this is due to the difference in the lifecycles of session and entity beans. For entity beans, the container needs to invoke callbacks such as ejbLoad and ejbStore within the context of transactions to ensure data integrity, whereas no such intervention is needed for session beans. So probably to make vendors' lives a little easier, Sun decides to give full control on transactions to the container for entity beans.
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Entity Bean can use CMT, but Session Bean can use CMT or BMT".....


In EJB 2.0 : Entity is point to CMT (main target).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic