RE: Creation of HttpServlets

2003-11-10 Thread Shapira, Yoav
Howdy, >That being the case. If you open a database connection in the init method >of a servlet, will that connection be the only one for all threads? Yup, which is why opening a connection in the init method is not a good idea for scalability. Instead, use a connection pool (possibly defined

Re: Creation of HttpServlets

2003-11-10 Thread Peter O'Reilly
That being the case. If you open a database connection in the init method of a servlet, will that connection be the only one for all threads? -Peter At 09:42 AM 11/10/2003, you wrote: Think of the servlet as a multithreaded object. It spawns a new thread for each request. On Monday 10 November

RE: Creation of HttpServlets

2003-11-10 Thread Shapira, Yoav
age- >From: Peter Guyatt [mailto:[EMAIL PROTECTED] >Sent: Monday, November 10, 2003 9:24 AM >To: [EMAIL PROTECTED] >Subject: Creation of HttpServlets > >Hi All, > > I am hoping someone can help answer me this quick question. > >If I had a web app with one servlet

Re: Creation of HttpServlets

2003-11-10 Thread Ben Souther
Think of the servlet as a multithreaded object. It spawns a new thread for each request. On Monday 10 November 2003 09:23 am, Peter Guyatt wrote: > Hi All, > > I am hoping someone can help answer me this quick question. > > If I had a web app with one servlet for processing all requests wou

Creation of HttpServlets

2003-11-10 Thread Peter Guyatt
Hi All, I am hoping someone can help answer me this quick question. If I had a web app with one servlet for processing all requests would that one servlet be used by every thread or is it a one to one relation (each thread uses its own instance of the servlet). Thanks Pete ---