• 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

Entity Bean with CMT question

 
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
any answers guys?
 
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic