Re: AW: making a singleton servlet

2005-12-07 Thread James Black
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thomas Strauß wrote: > This worker-thread can easily serialize all incoming requests in a working > queue (database- or file-based) and your servlet just pushes a job into the > working queue for the thread. That is my basic plan is to have one th

AW: making a singleton servlet

2005-12-07 Thread Thomas Strauß
ch, 7. Dezember 2005 03:33 An: Tomcat Users List Betreff: Re: making a singleton servlet -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Caldarale, Charles R wrote: >>From: James Black [mailto:[EMAIL PROTECTED] >>Subject: re: making a singleton servlet >> >>I am going to ma

Re: making a singleton servlet

2005-12-06 Thread Frank W. Zammetti
PROTECTED] Subject: re: making a singleton servlet I am going to make my servlet be static, with the hope that it will only have one instance running, regardless of how many clients connect to it. What do you mean by "servlet be static"? What syntactical construct are you emp

re: making a singleton servlet

2005-12-06 Thread Magyar, Bence
If you deploy your servlet with an application deployment scope, you will have just one instance of the server classes instantiated. Multiple clients can still call into your web service, but you have to make sure that your member data is thread-safe. James Black <[EMAIL PROTECTED]> wrote:

RE: making a singleton servlet

2005-12-06 Thread Caldarale, Charles R
> From: James Black [mailto:[EMAIL PROTECTED] > Subject: Re: making a singleton servlet > > My plan is to try: > public static class SomeServlet extends HttpServlet { ... } You can't use the modifier "static" there (only with internal classes). > That way

RE: making a singleton servlet

2005-12-06 Thread Caldarale, Charles R
> From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] > Subject: RE: making a singleton servlet > > It's my understanding that the container (Tomcat or > whatever) is free to process as many requests in > parallel as needed, as well as create multiple > servlet i

Re: making a singleton servlet

2005-12-06 Thread James Black
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Caldarale, Charles R wrote: >>From: James Black [mailto:[EMAIL PROTECTED] >>Subject: re: making a singleton servlet >> >>I am going to make my servlet be static, with the hope that >>it will only have one instance runn

RE: making a singleton servlet

2005-12-06 Thread Caldarale, Charles R
> From: James Black [mailto:[EMAIL PROTECTED] > Subject: re: making a singleton servlet > > I am going to make my servlet be static, with the hope that > it will only have one instance running, regardless of how > many clients connect to it. What do you mean by "se

re: making a singleton servlet

2005-12-06 Thread James Black
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am going to make my servlet be static, with the hope that it will only have one instance running, regardless of how many clients connect to it. My concern is what happens when two clients try to connect at one time. Will the second client block, un