Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Transaction Question from HF EJB page 479-480

 
Keith Rosenfield
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all:
The solution to the sharpen your pencil exercise on page 480 does not indicate that the ut.begin() method is in a transaction. This seems to contradict what is show on the previous page in step one. Is there a contradition? Does begin() run in a transaction or does the transaction begin after the begin() method returns?
 
Philippe Maquet
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Keith,
This seems to contradict what is show on the previous page in step one. Is there a contradition? Does begin() run in a transaction or does the transaction begin after the begin() method returns?

UserTransaction.begin() *starts* the transaction, so - by definition - it cannot execute *in* it.
Best,
Phil.
 
Keith Rosenfield
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Phillipe,
Thanks for clearing that up.
 
saran ram
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So that means begin() is not in the transaction(that means, the previous page was wrong?) somebody plz clear things up?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic