-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,
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
-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
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
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:
]
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