Reputation: 14507
How can we maintain State in Webservices ?
Upvotes: 1
Views: 2618
Reputation: 308998
Services should be stateless; if there's state to be maintained, it's the client's job to do it.
Upvotes: 0
Reputation: 31473
Web services are by nature stateless. Any attempt to maintain state is a hack, since you may hold something that will be used by the next request from the user, which will never come.
If you really need it, just keep it in session. For larger data sets, keep them out of session, but add session listener to cleanup that data when session expires.
Upvotes: 3