Quote:
Another option would be to utilize the Hibernate scroll() approach. The list() method you are currently using is roughly equivalent to the jdbc ResultSet. What you want instead is an equivalent to jdbc's ScrollableResultSet. In Hibernate, that would be the ScrollableResults obtained through the scroll() method. Here, too, you would still need to do some work to make sure the session remains available while scrolling.
Thanks again. I had looked at that blog earlier, but was still concered about implementing paging that way, because we have multple user who use the system and updates that occur simultaneously by different applications.
For example, what if I have rendered a view ( for user A ) and another user deletes items ( in another session ) but from the same list of items. Using that pagination exampled in that blog, user A will skip an item if another user in another session deletes an item from a similiar list.
This is why I am trying keeping the session open and using a ScrollableResult .This was the approach 'Steve' had recommended to me in a post while back.
I am wondering though that if I use this approach, how to associate the ScrollableResults ( which I assume represents the cursor ) with the various list I am displaying within the application and are being manipulated in the application.
If I use the same session for all the queries, will Hibnernate be able to find the proper open cursor when I subsequently do a scroll on a particular list ?
How will Hibernate know which cursor to use ?
thanks again,
Adam