문제

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?

도움이 되었습니까?

해결책

To use HashMap as webservice hash map as webservice

For static variables shared among threads thread sharing

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top