• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

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
 
He loves you so much! And I'm baking the cake! I'm going to put this tiny ad in the cake:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic