tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Salgueiro ...@sibs.pt>
Subject Re: REPOST: Multi-Threaded JSP??
Date Wed, 10 May 2000 13:51:07 GMT
Or you could use a Bean to do your multi-threaded processing.
This way, the page doesn't need to know or implement the Runtime inter-
face, only the Bean does. As a Java class can implement as many interfa-
ces as one wants, you can easily do that even if your Bean needs to
implement some more interfaces.

With servlets it's easier, following the general methodology to imple-
ment Threads.

Hope this helps

> Rob Parker wrote:
> 
> I'm a little puzzled by your request - but I'll try to put forward
> some points...
> 
> In general JSP's/Servlets provide small concise services, eg display
> content x, handle form y. Hence in most cases
> you don't need to handle the request using multiple threads. However
> within each JSP/servlet, the code needs to be thread
> safe because the page may need to handle concurrent requests. There is
> an architectural pattern based on the Model View Controller
> pattern which basically uses JSP's for the view and servlets for the
> controller. Hence since the JSP is only responsible for the
> view, it rarely needs some multithreaded processing pipeline.
> 
> On the other hand, if you were writing a chat server using a servlet,
> then you would probably want to use a multithreaded
> processing pipeline, eg, a background thread to dispatch incoming
> messages etc.
> 
> Thus I'd recommend looking at Sun's java website for more info on
> JSP's and the MVC architecture and www.servlets.com
> for more info on backgound threads in servlets.
> 
> regards
> 
> Rob
> 
>      ----- Original Message -----
>      From: Luis Andrei Cobo
>      To: tomcat-user@jakarta.apache.org
>      Sent: Wednesday, May 10, 2000 11:31 AM
>      Subject: REPOST: Multi-Threaded JSP??
> 
>      Does anyone know any examples of the feasibility of using
>      Threads on JSP pages or in Servlets? Im trying to do
>      something with these pages Im building which require a large
>      amount of processing that would be very efficient of broken
>      down into Threads on a variety of levels. Has anyone used
>      java.lang.Thread in thier JSP? gotten it to work?
>      If so, examples would be helpful. Im assuming for now that
>      its not a high demand topic since it probably involves hand
>      coding some of the _JSPservice directly, perhaps in order to
>      implement the runnable interface or something.
> 
> 
>      Also, by extension, if it IS possible, can RMI and Applet
>      Servlet communication be managed with a Thread?
> 
>      Documentation anywhere on this?
> 
>      Luis Andrei Cobo
>      Web Developer
> 
>      Sorry about the post yesterday...i was writing a draft and
>      accidentally sent it.

-- 
=======================================================
Bruno Salgueiro       (mailto:bs@sibs.pt)
                   
SIBS - Sociedade Interbancária de Serviços
Rua Soeiro Pereira Gomes, Lote 1, 1600 Lisboa, Portugal

Tel: + 351 21 791 88 33
Fax: + 351 21 794 24 40
http://www.sibs.pt

Esta mensagem foi assinada com certificado MULTIcert.
Para obter o certificado da Autoridade de Certificação
PILOTO MULTIcert dirija-se ao site
            http://www.sibs.multicert.com

"Computers are useless. They can only give you answers."
                                        --Pablo Picasso
=======================================================

Mime
View raw message