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,

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 servlet be static? What syntactical

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 running, regardless of how many clients

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 there should only be one servlet. My

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 Frank W. Zammetti
] 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 employing? If you mean using