• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SessionSynchronization, Help

 
Jaime Yong
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.
 
vikas prasad
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
 
Sankar Subbiramaniam
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The following link would help:
session synchronization discussion
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic