Hi,
Each request is handled in a seperate thread by the *container*. Has this
not been the case we would not have needed the SingleThreadModel interface.
So you do not need to create a seperate thread for each request. I think
even the containers do not do create a new thread for each request but use a
thread pool for this.
But different threads execute through the service method of your servlet
concurrently. So you need to write the servlets in a manner that they are
thread safe and not worry about where those multiple threads come from. :-))
if you are looking for some resources for threads, a good place is to go to
the link
http://www.cetus-links.org/oo_java.html and then see the section under
threads. You will find a lot of links out there.. !!
hope this helps,
Regds,
Gokul
----- Original Message -----
From: "Chinni" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 08, 2000 5:41 PM
Subject: Re: [SERVLET-INTEREST] Performance issues
> Hi Nic! & others!
>
> I'm planning to write a servlet which will act as a server. Many
clients will be calling the servlet. So I was just thinking about the need
for connection pooling( one connection handled by one thread seperately)
> Any links to Articles on Thread, specially which gives info about when
it's good to use & not to use.
> Thing is that If I write a server, should I create a seperate thread
for each client connected? If I do create seperate threads, If client No
increases What could be the problems.
>
> Thanx in advance.
>
> Chinni
>
>
>
>
> On Friday, September 08, 2000 at 07:42:42 AM, A mailing list for
discussion about Sun Microsystems Java Servlet API Technology. wrote:
>
> > >>> Chinni <[EMAIL PROTECTED]> 08-Sep-00 7:15:14 AM >>>
> > >Can someone write about their experiences about
> > >Servlet's performance.
> > >MAy be things like:
> > >1. What kind of problems faced AND how it was solved.
> > >2. What are the areas need to take care while developing
> > >3. Using Thread and its implications +ve & -ve.
> >
> > What is the title of the assignment you've been given?
> >
> >
> > Nic
> >
> >
___________________________________________________________________________
> > 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
> >
>
>
> --
> mailmetoday is a free e-mail service from India Today Group Online that
also rewards you with cool gifts. Sign up now at http://www.mailmetoday.com
>
>
___________________________________________________________________________
> 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