Standard servlets create a new thread per request but from a few
simple test i have run this appears not to be the case with GWT.
Why is this and is there any way to do this other than explicitly
creating a new thread at each method my service exposes.
Thanks in advance,
Stephen
--~--~-~
On Fri, Jan 23, 2009 at 08:17, stephen.sm...@paretopartners.com <
stephen.sm...@paretopartners.com> wrote:
>
> Standard servlets create a new thread per request but from a few
> simple test i have run this appears not to be the case with GWT.
>
*Wrong*.
Standard servlets create *one* instance pe
I never said it cretaed multiple instances, simply a new thread per
request.
On Jan 23, 4:30 pm, Shawn Pearce wrote:
> On Fri, Jan 23, 2009 at 08:17, stephen.sm...@paretopartners.com <
>
> stephen.sm...@paretopartners.com> wrote:
>
> > Standard servlets create a new thread per request but from a
Actually most containers pool their processor threads in order to conserve and
regulate resources.
The RemoteServiceServlet in GWT simply decodes the response and invokes the
method which the request
relates to. Theres no magic or rocket science going on here. I don't know what
tests you've r
stephen.sm...@paretopartners.com schrieb:
> On Jan 23, 4:30 pm, Shawn Pearce wrote:
>> On Fri, Jan 23, 2009 at 08:17, stephen.sm...@paretopartners.com <
>>
>> stephen.sm...@paretopartners.com> wrote:
>>
>>> Standard servlets create a new thread per request but from a few
>>> simple test i have ru
On Tue, Jan 27, 2009 at 01:42, stephen.sm...@paretopartners.com <
stephen.sm...@paretopartners.com> wrote:
>
> I never said it cretaed multiple instances, simply a new thread per
> request.
>
*sigh*. I must not have had enough coffee in the morning before replying to
your post. I read "thread"
@shawn
Thats ok :)
@jason
Well these "Tests" are very basic. i create an app with a simple rpc
call to the server that does something like this:
public boolean serverMethod() {
for (;;) {
if (false) {
break;
}
}
return true;
}
public boolean anotherMethod() {
return true;
I tried reproducing your test to see what you were getting. I found the
behavior when I ran the code
in Hosted Mode and executed "serverMethod()" /twice/ before executing
"anotherMethod()" (it didn't
matter how many Hosted Browsers I had open).
When running the same test in real browsers (I u
My appologies jason, you were correct. I totally forgot about max
connections per browser.
So it would appear that my servlet is multi theaded after all and as a
result, not thread safe :)
Maybe this should be added to the GWT docs as this is something that i
feel could be very easily overlooked
>From the documentation
Servlets typically run on multithreaded servers, so be aware that a servlet
must handle concurrent requests and be careful to synchronize access to
shared resources. Shared resources include in-memory data such as instance
or class variables and external objects such as fil
Cant find that anywhere. Can you post a link please
On Jan 28, 2:06 pm, Ben Tilford wrote:
> From the documentation
>
> Servlets typically run on multithreaded servers, so be aware that a servlet
> must handle concurrent requests and be careful to synchronize access to
> shared resources. Shared
Google didn't write the servlet spec, all servlet containers follow the spec
sun wrote.
http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpServlet.html
On Thu, Jan 29, 2009 at 5:25 AM, stephen.sm...@paretopartners.com <
stephen.sm...@paretopartners.com> wrote:
>
> Cant find
12 matches
Mail list logo