tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Curwen" <gb_...@gb-im.com>
Subject RE: One user seeing another user's data
Date Tue, 24 Feb 2004 15:01:35 GMT
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:flown2ski@yahoo.com] 
> 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 <fiol.bonnin@terra.es> 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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message