File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Entity Bean with CMT question

 
Gurumurthy Ramamurthy
Ranch Hand
Posts: 273
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ENTITY bean with CMT:
one limitation: When a method is executing, it can be associated with either a single transaction or no transaction at all.

This means that in the case of other Transaction mechanism say BMT (session beans), a method can be associated with more than one transaction?

I really don't understand this limitation. Can anyone explain?

Thanks,
Guru
 
Gurumurthy Ramamurthy
Ranch Hand
Posts: 273
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any answers guys?
 
Valentin Tanase
Ranch Hand
Posts: 704
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guru,


This means that in the case of other Transaction mechanism say BMT (session beans), a method can be associated with more than one transaction?

If a method runs within a transaction, then the whole bean (not only one single method) is reserved by that transaction. No other transactions can access the same bean and therefore the bean cannot be associated with two different transactions. Now the question is can the same client start another transaction within the first one (nested transaction) having the bean associated with two different transactions? You might notice though that this is not quite possible because J2EE doesn�t support nested transactions. However there is one way to overcome this limitation, if the underlying database supports nested transactions and the db vendor provides a jdbc driver with the same capability. Then using BMT and JDBC transaction you�ll be able (at least in theory) to associate the bean with more than one transaction.
Regards.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic