Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

TransactionRolledBack Exception

Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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?

Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • 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
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • 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
You didn't tell me he was so big. Unlike this tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic