• 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

TransactionRolledBack Exception

 
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have seen individual posts regarding this subject, I just want to make sure that I can summarize the correct behavior as follows, and ask one more question:

for both BMT and CMT beans, if there is a system exception in the middle of a transaction, the container logs the exception, rolls back the transaction and discard the bean instance. Again, this is for BOTH BMT and CMT beans.

now, when does the above system exception cause the container to throw TransactionRolledBackException or TransactionRolledBackLocalException to client? Does this have anything to do with transaction attributes in DD? Does ONLY CMT beans throw this exception?

Thanks.
Yan
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The container should throw one of these exceptions after discarding the bean instance if the instance had run in a client transaction. One can therefore deduce that the bean method must have had a transaction attribute of Required, Mandatory or Supports.
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yan 1327,

Please change your displayed name to conform to JavaRanch's Naming Policy.

In your case please use a first name (or initial) followed by a family name.

You may change your displayed name here.

Thank you
reply
    Bookmark Topic Watch Topic
  • New Topic