• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Transaction

 
Parinya Hiranpanthaporn
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Why a method require transaction form previous method,why it not create a new transactin?
Thanks.
 
Dale Seng
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Parinya Hirunpunthaporn:
Why a method require transaction form previous method,why it not create a new transactin?

The deal with transactions is that you have more than one "thing" you want to accomplish, and this group of "things" must all be executed properly, or none at all. So you need to run several methods in a single transaction so you can commit all actions or rollback all actions.
Like at the cash machine... the bank always wants to run both methods reduceBalance(10000) and ejectCash(10000).
--Dale--
PS: How much can 10000 rupis buy you nowadays?
 
Parinya Hiranpanthaporn
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Dale.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic