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
: 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
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.
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
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
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
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
]
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
: 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
: 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
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
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
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
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
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
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
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
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
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
]
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
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
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
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
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
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
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
:[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
:[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
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
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
30 matches
Mail list logo