aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Stateless Session Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Stateless Session Bean" Watch "Stateless Session Bean" New topic

Stateless Session Bean

Giri Prasad
Ranch Hand

Joined: Mar 08, 2001
Posts: 56
Hi All
How does structured variables like HashTable behave when declared as private variables of Stateless bean??
Kyle Brown
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
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 Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at for other WebSphere information.
Giri Prasad
Ranch Hand

Joined: Mar 08, 2001
Posts: 56
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.
I agree. Here's the link:
subject: Stateless Session Bean