Re: Servlet thread safety in Tomcat

2004-02-11 Thread kwirirai
Thanks to All for your help ! :-) Sofar it seems to be working ,no data corruption,I localized all variables ,put in some synchronized blocks,removed them again(synchronized blocks) and seems to work, but not sure why without the synchrozed blocks its working . :-\ Is there free software that

RE: Servlet thread safety in Tomcat

2004-02-11 Thread Mike Curwen
: kwirirai [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 11, 2004 11:32 AM To: Tomcat Users List Subject: Re: Servlet thread safety in Tomcat Thanks to All for your help ! :-) Sofar it seems to be working ,no data corruption,I localized all variables ,put in some synchronized

Re: Servlet thread safety in Tomcat

2004-02-11 Thread Antonio Fiol BonnĂ­n
Mike Curwen wrote: 1) if by 'localized' you mean I've moved the variables from outside the doGet()/doPost() methods, to inside those methods... then this is why there is no 'data corruption' (due to multithreading issues), and it's why you don't require synchronized access to those variables.

RE: Servlet thread safety in Tomcat

2004-02-11 Thread Bodycombe, Andrew
You could try jmeter http://jakarta.apache.org/jmeter/index.html -Original Message- From: kwirirai [mailto:[EMAIL PROTECTED] Sent: 11 February 2004 17:32 To: Tomcat Users List Subject: Re: Servlet thread safety in Tomcat Thanks to All for your help ! :-) Sofar it seems to be working

RE: Servlet thread safety in Tomcat

2004-02-10 Thread Shapira, Yoav
Howdy, this has made me think a lot about threading , it is really complicated , I have researched about it but never found a clean solution to Threading is complicated, yes, and difficult to do well. Which is why when possible you should let someone else do the work for you and use a library

Servlet thread safety in omcat

2004-02-09 Thread kwirirai
Hi All I am developing an application that uses JavaMail.What I am concered is the issue of thread safety,and efficiency.My question is do I need to employ synchronized blocks in my Servlet code or is there another way to implement thread safety.I have been experimenting with the application

Servlet thread safety in Tomcat

2004-02-09 Thread kwirirai
Hi All I am developing an application that uses JavaMail.What I am concered is the issue of thread safety,and efficiency.My question is do I need to employ synchronized blocks in my Servlet code or is there another way to implement thread safety.I have been experimenting with the application and I

RE: Servlet thread safety in Tomcat

2004-02-09 Thread Shapira, Yoav
] Sent: Monday, February 09, 2004 12:48 PM To: [EMAIL PROTECTED] Subject: Servlet thread safety in Tomcat Hi All I am developing an application that uses JavaMail.What I am concered is the issue of thread safety,and efficiency.My question is do I need to employ synchronized blocks in my Servlet code

Re: Servlet thread safety in Tomcat

2004-02-09 Thread kwirirai
: Servlet thread safety in Tomcat Hi All I am developing an application that uses JavaMail.What I am concered is the issue of thread safety,and efficiency.My question is do I need to employ synchronized blocks in my Servlet code or is there another way to implement thread safety.I have been

RE: Servlet thread safety in Tomcat

2004-02-09 Thread Mike Curwen
: Servlet thread safety in Tomcat Hi All I am developing an application that uses JavaMail.What I am concered is the issue of thread safety,and efficiency.My question is do I need to employ synchronized blocks in my Servlet code or is there another way to implement thread safety.I have been

RE: Servlet thread safety in Tomcat

2004-02-09 Thread Shapira, Yoav
Howdy, My initial thought ( :-) forgive me its some time since I have coded servlets) was that Tomcat will create a new servlet instance that is totally independed of the other, for each request. Tomcat will not create a new instance of a servlet for every request to that servlet. Tomcat

Re: Servlet thread safety in Tomcat

2004-02-09 Thread Sam Seaver
My initial thought ( :-) forgive me its some time since I have coded servlets) was that Tomcat will create a new servlet instance that is totally independed of the other, for each request. Tomcat will not create a new instance of a servlet for every request to that servlet. Tomcat will

Re: Servlet thread safety in Tomcat

2004-02-09 Thread David Ramsey
is too broad to solicit a detailed response. Yoav Shapira Millennium ChemInformatics -Original Message- From: kwirirai [mailto:[EMAIL PROTECTED] Sent: Monday, February 09, 2004 12:48 PM To: [EMAIL PROTECTED] Subject: Servlet thread safety in Tomcat Hi All I am

Re: Servlet thread safety in Tomcat

2004-02-09 Thread kwirirai
is actualy mixing up. -Original Message- From: kwirirai [mailto:[EMAIL PROTECTED] Sent: Monday, February 09, 2004 12:48 PM To: [EMAIL PROTECTED] Subject: Servlet thread safety in Tomcat Hi All I am developing an application that uses JavaMail.What I am concered is the issue

RE: Servlet thread safety in Tomcat

2004-02-09 Thread Shapira, Yoav
Howdy, But how does Tomcat log the sessions variables PER request then? Is the session object independent of the servlet object, and is there one session object PER request? The session object is independent of the servlet object. There is NOT one session per request (unless the user's session

RE: Servlet thread safety in Tomcat

2004-02-09 Thread Shapira, Yoav
Howdy, Thanks ,It realy means I have to redesign the whole app ,but there is the issue of networking and Java Mail, it seems the other servlet has to wait for a very long time for the other servlet to get all the mail.My question is can Tomcat process two sessions of a servlet downloading

Re: Servlet thread safety in Tomcat

2004-02-09 Thread kwirirai
snipet for (int i = msgCount; i =stopPoint; i--) { m = folder.getMessage(i); //get the message } This actually hapening when one session is downloading suppose 300 emails, and the other lets say 50.This suppose ,what I am actually doing is I have two

Re: Servlet thread safety in Tomcat

2004-02-09 Thread kwirirai
requirements. Your original post is too broad to solicit a detailed response. Yoav Shapira Millennium ChemInformatics -Original Message- From: kwirirai [mailto:[EMAIL PROTECTED] Sent: Monday, February 09, 2004 12:48 PM To: [EMAIL PROTECTED] Subject: Servlet thread

RE: Servlet thread safety in Tomcat

2004-02-09 Thread Shapira, Yoav
Howdy, But if I am to synchronise my code blocks won't that slow done the application, or is there a mode that you can put Tomcat into so that it will create a new instance servlet thread with its own variables and execution space and stuff like that .Because I was thinking putting all those

RE: Servlet thread safety in Tomcat

2004-02-09 Thread Yu, Albert
] Subject: Servlet thread safety in Tomcat Hi All I am developing an application that uses JavaMail.What I am concered is the issue of thread safety,and efficiency.My question is do I need to employ synchronized blocks in my Servlet code or is there another way

RE: Servlet thread safety in Tomcat

2004-02-09 Thread Mike Curwen
don't pile up)? Yoav.. is that completely wrong? -Original Message- From: kwirirai [mailto:[EMAIL PROTECTED] Sent: Monday, February 09, 2004 1:12 PM To: Tomcat Users List Subject: Re: Servlet thread safety in Tomcat But if I am to synchronise my code blocks won't that slow

RE: Servlet thread safety in Tomcat

2004-02-09 Thread Shapira, Yoav
Howdy, Synchronization does produce overhead, but it's what you *must* do if you will not re-write your servlets to no longer contain instance fields, *and* you wish to provide thread safety. Well-put. And you might be pleasantly surprised at how small the overhead is. Which is why I always

Re: Servlet thread safety in Tomcat

2004-02-09 Thread Parsons Technical Services
2:23 PM Subject: RE: Servlet thread safety in Tomcat If you implement the SingleThreadModel interface for your Servlet class, TomCat will create a new instance for each request. Albert -Original Message- From: kwirirai [mailto:[EMAIL PROTECTED] Sent: Monday, February 09, 2004 2:12

Re: Servlet thread safety in Tomcat

2004-02-09 Thread kwirirai
Thanks very much for your contribution guys! :-) This has given me new approaches to the problem.I intend to remodify,try the synchronization and do the testing/benchmarking.But this has made me think a lot about threading , it is really complicated , I have researched about it but never found

Servlet thread safety

2003-06-09 Thread G. Wade Johnson
This may be an obvious question, but is there any guarantee one way or the other about whether there is a separate servlet object for each concurrent request. In other words, is there any chance that instance data would be shared between two requests? If so, are we guaranteed if the instance data

RE: Servlet thread safety

2003-06-09 Thread Shapira, Yoav
PROTECTED] Sent: Monday, June 09, 2003 12:08 PM To: Tomcat Users List Subject: Servlet thread safety This may be an obvious question, but is there any guarantee one way or the other about whether there is a separate servlet object for each concurrent request. In other words, is there any chance

Re: Servlet thread safety

2003-06-09 Thread G. Wade Johnson
:[EMAIL PROTECTED] Sent: Monday, June 09, 2003 12:08 PM To: Tomcat Users List Subject: Servlet thread safety This may be an obvious question, but is there any guarantee one way or the other about whether there is a separate servlet object for each concurrent request. In other words

RE: Servlet thread safety

2003-06-09 Thread John Corrigan
:[EMAIL PROTECTED] Sent: Monday, June 09, 2003 12:08 PM To: Tomcat Users List Subject: Servlet thread safety This may be an obvious question, but is there any guarantee one way or the other about whether there is a separate servlet object for each concurrent request. In other words

Re: Servlet thread safety

2003-06-09 Thread G. Wade Johnson
Johnson [mailto:[EMAIL PROTECTED] Sent: Monday, June 09, 2003 9:43 AM To: Tomcat Users List Subject: Re: Servlet thread safety How about the flip side? Is instance data guaranteed separate for each request? I Have some code that relies on instance data and I just had the horrible realization

Re: Servlet thread safety

2003-06-09 Thread Bill Barker
be be processed by the same instance of your Servlet class, however it is not guarantted. -Original Message- From: G. Wade Johnson [mailto:[EMAIL PROTECTED] Sent: Monday, June 09, 2003 9:43 AM To: Tomcat Users List Subject: Re: Servlet thread safety How about the flip side? Is instance