Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

SessionSynchronization, Help

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
The following link would help:
session synchronization discussion
 
bacon. tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic