Krishnakant Mane wrote:

hello,
I refered to the docs in tomcat 5 for connection
pooling. the document is pritty comprehencive and I
understood the server.xml part of it.
but now I want to know how exactly can I use a
connection from the pool in my servlet.
the example in tomcat documentation is on a jsp based
applicatio. but I don't understand how I use a pooled
connection in a servlet.


You use a pooled connection in a simillar manner to a driver managed connection, except that you look up a resource (JNDI in this case). In your servlet just look up the resource.

should I initialise the connection in the Init method?
how and when should I close the connection?


You should close the connection immediately when you are done with it. Best not to pass references of them around. You would close them as a you would in a driver managed connection, that is Connection.close() ;

and wat entries in the web.xml file will effect
connection pooling?


Please help it is really urgent.
thanks
Krishnakant.

Send instant messages to your online friends http://uk.messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to