Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General 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 ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Quick question on transactions

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the container always roll-back the transaction (or at least mark the transaction for roll-back)? Even whith BMT beans?
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Does the container always roll-back the transaction (or at least mark the transaction for roll-back)? Even whith BMT beans?


What do you mean by "always"? Transactions will only rollback when there are unexpected events happened. For BMT, the container will not help you to rollback the transactions, you need to explicit declare that the transaction is rollback by ut.rollback(), where ut is an object of UserTransaction.

Nick
 
Grand Puba
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry Nick,
I wasn't very clear in my question (I think that's the stress because I have the exam today). I actually ment: Does the container always roll-back the transaction (or at least mark the transaction for roll-back) when a System exception is thrown ?

Sorry for my previous question...
Thx 4 the reply thou
 
it's a teeny, tiny, wafer thin ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic