|
The
answer to your question depends on where you create the connection. If you put
it in the init method, then there is only one because init only gets run the
first time the Servlet is activated. If you put your connection in the
doGet or doPost method, then you will have one connection per session. If
you don't have one connection per session then you need synchronize access to
the connection object or you'll have problems.
If you
expect more than a few users to be making use of this connection, then it is a
better idea to use a connection pool of some kind.
-
Mac
|
- Servlets & threads Gerry Duhig
- Re: Servlets & threads eric chacon
- Re: Servlets & threads Wolle
- MacCormac Rinehart
