well uh....   perhaps I'm misunderstanding something, but 'application'
is the completely wrong scope, if you want the javabeans to *not* be
shared between all users of your application.


> -----Original Message-----
> From: Anbu [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, February 24, 2004 5:39 AM
> To: Tomcat Users List
> Subject: Re: One user seeing another user's data
> 
> 
> Hello Anotonio,
>  
> Thanks for your reply.
>  
> We are using JSPs and invoke java beans from them. We have 
> the scope parameter set to 'application' in JSPs. I will look 
> into the bean source code and check for non-final static variables.
>  
> Regards,
> Anbu
> 
> Antonio_Fiol_Bonnín <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> - Try to turn all your servlet's non-final STATIC or INSTANCE 
> variables 
> into LOCAL scope variables. This is definitely the first 
> step, and will 
> likely remove 90% of problems.
> 
> For singletons or static variables outside your servlet:
> 
> - Concentrate all your accesses to each of them in a short portion of 
> code (put all accesses together). Surround them with a 
> synchronized(object) { }. You will remove 80% of the 
> remaining problems.
> 
> - If a collection is not in local scope, use a synchronized 
> version of 
> it. (??%)
> 
> For the rest, you will have to figure out The most important point 
> once the above are OK, in my opinion, is that you know the business 
> logic concerning object access and its required independence. 
> It's more 
> difficult, but you probably know that better than anyone.
> 
> 
> Yours,
> 
> 
> Antonio Fiol
> 
> 
> 
> 
> Anbu wrote:
> 
> >Hello All,
> > 
> >I think that this problem (one user seeing another user's 
> data) might 
> >be due to threadedness/concurrency of Tomcat. Ofcourse there 
> could be problem with the JSP application too.
> > 
> >Can anyone throw some light on the possible session mixups happening 
> >with Tomcat server? I have seen the dev mailing list that 
> such a thing happens when there are two or more tomcat server 
> instances.
> > 
> >Thanks and Regards,
> >Anbu
> >
> > 
> >
> 
> 
> 
> Keywords (for easier searches): threading issues, session mixup, 
> concurrency problems.
> 
> 
> 
> 
> > ATTACHMENT part 2 application/x-pkcs7-signature name=smime.p7s
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail SpamGuard - Read only the mail you want.
> 


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

Reply via email to