Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stateless Session Bean

 
Giri Prasad
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
How does structured variables like HashTable behave when declared as private variables of Stateless bean??
Thanks
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, they work fine all the way up until a call comes from a client that expects a value to be inside the stateless session bean and finds that it's been handed a totally different instance by the container!
That's why you should only put READ-ONLY variables in an SSB.
Kyle
 
Giri Prasad
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kyle
Can you please explain it further. How this whole thing is managed by the container and why there is wrong data( or same data even when the input changed) returned when it does read_write into private HashTable or any other structured data.
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic