• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

SessionSynchronization

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic