Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

SessionSynchronization, Help

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can someone help me with this. On page 513 HFEJB, the first BANG box says : Only ststeful
session beans can implement SessionSynchronization, because stateless session beans are allowed
to maintain a transaction once a method has ended.(means BMT). The Second BANG box says :
SessionSynchronization is for CMT beans only. Is this a trick or something ?


By the way, assuming it is a mistake on page 513, why stateless session beans are allowed
to implement SessionSynchronization ? Please help me.
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Jamie,
I think you mis read the statement.On page 513 it says stateless session Bean can't implement Session Synchronization because it is not allowed to maintain transaction once the method has ended. the only difference between a CMT stateless and Stateful bean is when you specify at DD. so even if a bean which implement Session synchronization and is a stateless. I think container will not call those method. which are in SessionSynchronization for a stateless bean.
vikas prasad
SCJP1.4 SCWCD1.4 SCBCD1.3
 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The following link would help:
session synchronization discussion
 
Screaming fools! It's nothing more than a tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic