where to keep the "state"? my point is all state objects are referred by session bean's member fields and kept. from caller point of view, there is no big different.
In the perspective of an
java object both SLSB and SFSB has states.
the "stateless" vs "stateful" refers the "conversational" states.
suppose you have a SLSB OrderManager. It is a field currentOrder with its
setters and getters. With the SLSB, if you have the following calls:
now it is not gurantted that order and myorder represents the same order object.
But if it is a SFSB, it is you can expect the order object for getter is the one you have passed in to the setter.
In theory, if you only call the SFSB only once in its life time, then your SFSB will just function as a SLSB. But then,
you should use SLSB for performance reason.
Thanks,<br />Jack Zhou<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS,SCEA