Folks,
Comments inline...
Raymond Feng wrote:
Even for the stateless case, I would argue it's legal to do the
optimization.
The SCA java spec says:
"283 1.2.4.1. Stateless scope
284 For stateless components, there is no implied correlation between
service requests."
You've picked the right spec lines....
I think it should also be valid to get the same instances for multiple
requests. For JEE stateless sessions, the container usally maintains an
instance pool and pick the instance from pool as needed. So there is
only one request at a time, then there is a good chance that the same
instance is picked.
Yes, there is no guarantee that you will get a DIFFERENT instance each
time. The only point that is emphasised is that the implementer cannot
rely on getting the SAME instance for each subsequent request. If the
implementer stores some state then that state could be over the hills &
far away when the next request arrives.
My understanding of "stateless" is that there is no garauntee that
multiple requests will be routed to the same instance.
+1, absolutely
Thanks,
Raymond
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]