Pergunta

I'd like to provide a webservice that can preserve state for a client. The response will have a subset of a list, while the full list should stay on the server side.

An initial client request will get an ID returned that can be used in further processes to obtain more resutls (similar to pagination).

How could I create such a stateful webservice? Is a static HashMap<ID, List<Items>> the way to go? Are static lists shared among threads (as every client request to the webservice will run in it's own thread)?

Could you recommend anything?

Foi útil?

Solução

To use HashMap as webservice hash map as webservice

For static variables shared among threads thread sharing

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top