Yes.  The standard approach is to only keep in memory results that are currently on 
the page.  Have a persistence layer (either EJB or O/R mapping tool, or a combination 
of the two) "page" the results for you. i.e., you give it search criteria, sort 
criteria, a begin index, and an end index, and it gives you back the results.  This 
solves two problems:  The one you are encountering with bad results with two different 
windows, and the memory problems associated with very large result sets.

There are examples of this sort of implementation out there; sorry I can't provide 
links. :(

peace,
Joe

> -----Original Message-----
> From: Chen, Dean (Zhun) [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 03, 2002 10:13 AM
> To: 'Struts Users Mailing List'
> Subject: Should I use a persistence layer?
> 
> 
> Hi,
> 
> For an web application, is there a way for a user to paginate through
> (similar to google) a lot of data across multiple browser windows.
> 
> The usual way of paginating with session scope works fine. 
> However, if a
> user has 2 windows open on the same application. When he/she 
> queries on one,
> then queries on another, and then comes back to the first 
> window and click
> "Next", he/she will get bad results.
> 
> Does this lead to EJB or any other persistence layers?
> 
> Thanks,
> 
> 
> Dean Chen
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to