I am reading the Java EE7 documentation , and here is what it says for stateless bean. I am confused by what is meant by the expression in bold below
A session without a bean does not support dialog state with the client. When a client invokes methods of a stand-alone bean, instance variables of a bean may contain a state specific to that client, but only for the duration of the call. When the method is completed, the state of the client should not be saved. However, clients can change the state of instance variables in a merged state without beans state, and this state is transferred to the next call to the merged state without saving the bean state. With the exception of the method call, all instances of the idle bean are equivalent, allowing the EJB container to assign an instance to any client. That is, a session state without a bean should be applied to all clients.
However, from this post, instance variables in a session with no beans state
A session without a bean is an object that does not have a state associated with it, but can have an instance state. It does not allow simultaneous access to the bean. The contents of instance variables are not guaranteed for all method calls. All instances of a non-bean session must be considered identical by the client.
I feel that there is a contradiction here. The docs claim (in my opinion) that the state of the instance variable is saved in subsequent calls, while the last message claims that there is no guarantee that the state is saved.
Please explain
PS: I read this post: but I did not understand the answer
instance variables in a beans stateless session
EDIT will generate the SO message above
A stand-alone Beans session (SLSB) is not tied to one client, and there is no guarantee that one client can get the same instance with every method call (some containers can create and destroy Beans with every method call session, this is a solution for a specific implementation, but instances are usually combined - and I don't mention cluster environments). In other words, although stateless Beans may have instance variables, these fields are not specific to a single client, so do not rely on them between remote calls.