Originally posted by Jayadev Pulaparty:
Isn't it going to be tricky for the container to get the data in sync with other instances of the servlet for the same client? Does this imply that its a bad idea to rely on instance data in the servlet and we should scope it to session (say)? Any thoughts on this.
As you imply, you want certain data to be tied to the client, so of course that particular data should be scoped to a session. You're just guaranteed that no 2 threads (except possibly your own created threads if any) will simultaneously access the servlet instance, so you can have instance data that gets accessed by different methods of the same instance without having to worry about that data getting stomped on by another thread hitting methods simultaneously on the instance.
or am i missing the point here?