You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Sabyasachi Biswas <bi...@gmail.com> on 2005/10/24 13:38:00 UTC

Paginated List Problem

Hi all,
 I am having a problem using paginated List in my Project.
 I am using the same Paginated List object for various purposes(I have to
use only one object of Paginated List). The problem arises when there are
concurrent users , the Paginated List Object returned should be different
for different criteria as requested by the user.
 But, this does not happen as, Ibatis uses the same DAO Implementation
object.
 For eg:
 I have a search page which searches the number of user on the basis of
roles.
  I have another search page which searches the number of user on the basis
of departments.
 When User1 searches on the basis of roles he gets a paginated list.
 When User2 searches on the basis of departments he gets a paginated list .
 Now when User 1 iterates over the paginated list he gets the results of
User 2.
 Please help me with your suggestions.
 Thanks in advance,
 Regards,
 Sabyasachi Biswas.

Re: Paginated List Problem

Posted by Clinton Begin <cl...@gmail.com>.
You can't use the same paginated list for two different threads. The root of
this problem seems to have nothing to do with iBATIS...but does suggest a
serious design problem in your application.

Sorry to sound harsh, but I wouldn't be doing you any favors if I softened
that message. :-/

Cheers,
Clinton


On 10/24/05, Sabyasachi Biswas <bi...@gmail.com> wrote:
>
> Hi all,
>  I am having a problem using paginated List in my Project.
>  I am using the same Paginated List object for various purposes(I have to
> use only one object of Paginated List). The problem arises when there are
> concurrent users , the Paginated List Object returned should be different
> for different criteria as requested by the user.
>  But, this does not happen as, Ibatis uses the same DAO Implementation
> object.
>  For eg:
>  I have a search page which searches the number of user on the basis of
> roles.
>   I have another search page which searches the number of user on the
> basis of departments.
>  When User1 searches on the basis of roles he gets a paginated list.
>  When User2 searches on the basis of departments he gets a paginated list
> .
>  Now when User 1 iterates over the paginated list he gets the results of
> User 2.
>  Please help me with your suggestions.
>  Thanks in advance,
>  Regards,
>  Sabyasachi Biswas.
>