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

SessionSynchronization

 
Dan T
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In spec 7.6, it says that "If a transaction rolled back has been requested instead, the rollback status is reached without the container issuing a beforeCompletion. "

However, down below in the Notes 1, it says " The Container must call the afterBegin, beforeCompletion, and the afterCompletion methods if the session bean class implements directly or indrectly, the SessionSynchronization inferface"

How come notes 1 say this?
 
alzamabar
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ryan Wong:
In spec 7.6, it says that "If a transaction rolled back has been requested instead, the rollback status is reached without the container issuing a beforeCompletion. "

However, down below in the Notes 1, it says " The Container must call the afterBegin, beforeCompletion, and the afterCompletion methods if the session bean class implements directly or indrectly, the SessionSynchronization inferface"

How come notes 1 say this?


I think the note refers to the general implementation of the SessionSynchronization (i.e. in normal circumstances). The specs say clearly, as you stated, that the Container 'may not invoke beforeCompletion' if the transaction has been marked for rolled bacl. I found this question on a mock exam, and actually you are supposed to answer that the beforeCompletion method will not be invoked.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic