Hi all,
I have a client/server app with a stateless server using Spring. The hibernate docs recommend creating a new session fro each business method call in a stateless app so thats what I'm doing. If my service API just looks like this:
public List doMyQuery(int firstResult, int maxResults)
and I create a new session for each call and rerun the query, then the result set that I'm paging against can potentially change on each call if the database if modified between calls. Is this really what's recommended? If not, what is the best practice in this case? Are there any examples you can point me to?
Thanks,
Edward
|