If my servlet must perform some external process, rmi, sockets, etc. I
monopolize the Servlet thread until my process is done, for no good reason.
If n jobs are waiting for the external process to complete, NO THREADS are
available from the Servlet Container pool, and all http-servlet traffic
halts.
Sorry, but synchronous servlets are a hugh limitation. Obviously my example
was very simplicistic.
----- Original Message -----
From: "Pier P. Fumagalli" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, March 03, 2001 7:38 PM
Subject: Re: Why is servlet API synchronous only?
> Dave Brosius <[EMAIL PROTECTED]> wrote:
> >
> > Apparently the Servlet API cannot handle asynchronous behavior
> > I don't see why the Servlet API shouldn't be extended to
> > allow the following class to work correctly.
>
> I don't see the point of having an "Asynchronous Servlet". It's totally
> useless, as all the threading you used into your servlet, is already
> implemented by the servlet container, and what you do in your service()
> method is exactly what the servlet container does when invoking the
servlet.
>
> > Servlets in their current form are inefficient
>
> Your servlet in its current form is inefficient, because it brings thread
> pooling within the servlet itself, while a single thread generated at the
> container level can be used for multiple servlets.
>
> > Dave Brosius [EMAIL PROTECTED]
>
> Pier (servlet spec member since... 99? 98? Can't even remember!)
>
> --
> --------------------------------------------------------------------------
--
> Pier Fumagalli - Sun Microsystems Inc. -
<mailto:[EMAIL PROTECTED]>
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html