Subject: Re: Simultaneous request from same IP
Chris,
I've played around with a servlet almost identical to your
original (not
full!) test-case (below). (Did you actually get the problem
to appear on
this one or is it just a theoretical cut-down of the larger
example you
posted later
as
identical requests or whether they're different requests that have been
confused
Mike :-)
- Original Message -
From: Cox, Charlie [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, December 17, 2002 2:01 PM
Subject: RE: Simultaneous request from same IP
? filters must also be written to be
thread safe. I don't recall seeing a web.xml.
Charlie
-Original Message-
From: Mike W-M [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 17, 2002 9:28 AM
To: Tomcat Users List
Subject: Re: Simultaneous request from same IP
A sensible
Thank you all for your help. I have found a solution that will work.
-cb
-Original Message-
From: Cox, Charlie [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 17, 2002 9:44 AM
To: 'Tomcat Users List'
Subject: RE: Simultaneous request from same IP
well, its not the whole solution
, 2002 10:22 PM
To: Tomcat Users List
Subject: Re: Simultaneous request from same IP
On Sun, 15 Dec 2002, Chris Bick wrote:
Date: Sun, 15 Dec 2002 22:05:45 -0500
From: Chris Bick [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Simultaneous request
, 2002 3:13 PM
Subject: RE: Simultaneous request from same IP
Thanks for responding. I don't think it is an instance variable
problem. Here is the code to reproduce the problem:
public class AServlet extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse
reponse
[mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 10:28 AM
To: Tomcat Users List
Subject: Re: Simultaneous request from same IP
I might be missing the point!
What exactly is the problem? I didn't think there was any rule that
said
you couldn't have two identical requests running
:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 10:28 AM
To: Tomcat Users List
Subject: Re: Simultaneous request from same IP
I might be missing the point!
What exactly is the problem? I didn't think there was any rule that
said
you couldn't have two identical requests running at the same
or are the parameters
identical too? (The getQueryString includes the parameter info, right?)]
Mike.
- Original Message -
From: ContestAdmin [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, December 16, 2002 4:06 PM
Subject: Re: Simultaneous request from same IP
are
different.
Let me know if anyone can reproduce this?(If you have the time...)
-cb
-Original Message-
From: Mike W-M [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 12:02 PM
To: Tomcat Users List
Subject: Re: Simultaneous request from same IP
I should think it's likely, indeed
Can you post an example servlet (or the real code) that can reproduce
this? (No offense but ...) I really think there ios something with your
code.
-Tim
Chris Bick wrote:
I've reproduced this problem with tomcat 3.2 and every version of 4.1 up
to 4.1.12
I haven't gone any further than all
Message-
From: Chris Bick [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 12:15 PM
To: Tomcat Users List
Subject: RE: Simultaneous request from same IP
I've reproduced this problem with tomcat 3.2 and every
version of 4.1 up
to 4.1.12
I haven't gone any further than
();
}
}
}
-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 12:21 PM
To: Tomcat Users List
Subject: Re: Simultaneous request from same IP
Can you post an example servlet (or the real code) that can reproduce
this? (No offense but ...) I really
: Simultaneous request from same IP
Can you post an example servlet (or the real code) that can reproduce
this? (No offense but ...) I really think there ios something with your
code.
-Tim
Chris Bick wrote:
I've reproduced this problem with tomcat 3.2 and every version of 4.1
up
to 4.1.12
I
. This
should solve your problem.
Andy
-Original Message-
From: Chris Bick [mailto:[EMAIL PROTECTED]]
Sent: 16 December 2002 17:36
To: Tomcat Users List
Subject: RE: Simultaneous request from same IP
No offense taken. I still can't believe that this problem may exist.
If you can find
:40 PM
To: Tomcat Users List
Subject: Re: Simultaneous request from same IP
Is TrafficCop.java thread safe?
If not - that is your problem. Both requests are using the same
trafficCop instance.
-Tim
Chris Bick wrote:
No offense taken. I still can't believe that this problem may exist.
If you
PM
To: Tomcat Users List
Subject: Re: Simultaneous request from same IP
Is TrafficCop.java thread safe?
If not - that is your problem. Both requests are using the same
trafficCop instance.
-Tim
Chris Bick wrote:
No offense taken. I still can't believe that this problem may exist.
If you can
is that TrafficCop should have nothing to do with the
behavior that I am seeing inside the servlet. Right?
-cb
-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 1:05 PM
To: Tomcat Users List
Subject: Re: Simultaneous request from same IP
.
- Original Message -
From: Chris Bick [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, December 16, 2002 6:25 PM
Subject: RE: Simultaneous request from same IP
TrafficCop is thread safe because add() is synchronized. Regardless if
trafficcop is thread safe
[mailto:[EMAIL PROTECTED]]
Sent: 16 December, 2002 11:26 AM
To: Tomcat Users List
Subject: RE: Simultaneous request from same IP
TrafficCop is thread safe because add() is synchronized. Regardless if
trafficcop is thread safe or not the values that I get from
HttpServletRequest should
Thanks George, problem solved. Couldn't have done it with out you.
-cb
-Original Message-
From: Sexton, George [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 2:44 PM
To: Tomcat Users List
Subject: RE: Simultaneous request from same IP
Let us apply Occam's Razor here. You
TrafficCop is thread safe because add() is
synchronized. Regardless if trafficcop is
No, this is false.
The add() method is syncronized, and therefore thread safe. But that is
not where the problem lies.
TrafficCop may be thread safe, but access to it is not.
Two objects are updating a
Not sure I understand your last two statements.
Could you elaborate a bit more?
Thanks,
-cb
-Original Message-
From: Larry Meadors [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 3:42 PM
To: [EMAIL PROTECTED]
Subject: RE: Simultaneous request from same IP
TrafficCop
Two requests are coming into your servlet. A SINGLE servlet object
handles BOTH requests. That single object has a SINGLE child object
(trafficCop) that gets updated once for each request. That child object
is shared by both requests - it is not unique for each request unles you
make it a method
?
Thanks,
-cb
-Original Message-
From: Larry Meadors [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 3:42 PM
To: [EMAIL PROTECTED]
Subject: RE: Simultaneous request from same IP
TrafficCop is thread safe because add() is
synchronized. Regardless if trafficcop
At 01:42 PM 12/16/2002, you wrote:
The fact that the add() method is syncronized has no impact on this -
only one request is updating at a time. However, later when you ask for
the value that was updated, you only get the second value because there
is only one trafficCop object to get updated
From: Justin Ruthenbeck [mailto:[EMAIL PROTECTED]]
That said, there's nothing inherently wrong with what he's doing and I
think it took quick to blame what he's seeing on this arrangement. To
make
a conclusive argument, I think we'd have to see the TrafficCop
object's
code.
To make a
.
- Original Message -
From: Chris Bick [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, December 16, 2002 3:13 PM
Subject: RE: Simultaneous request from same IP
Thanks for responding. I don't think it is an instance variable
problem. Here is the code to reproduce
, December 16, 2002 3:13 PM
Subject: RE: Simultaneous request from same IP
Thanks for responding. I don't think it is an
instance variable
problem. Here is the code to reproduce the problem:
public class AServlet extends HttpServlet {
public void doGet(HttpServletRequest request
On Sun, 15 Dec 2002, Chris Bick wrote:
Date: Sun, 15 Dec 2002 22:05:45 -0500
From: Chris Bick [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Simultaneous request from same IP
Hello,
Has anyone seen two requests from the same IP
30 matches
Mail list logo