Re: connection pooling confusion help needed
Hi, Please follow the directions by user rmorriso on the following link. It should work fine. http://forums.devshed.com/archive/t-120081 On Fri, 25 Mar 2005 19:11:15 + (GMT), Krishnakant Mane <[EMAIL PROTECTED]> wrote: > hello all, > im going to put a web application in java servlets > with tomcat 5 on a production ready server for real > time use. > I am thinking of using connection pooling but I am a > bit confused. I have initialised all my connections > in the servlet's init method and closed them in > distroy method. > so these connections are not closed untill the server > is turned off. now how will the connection pooling > track these un closed connections? > and I will like some one to make me understand with an > example of how to implement connection pooling using > mysql jdbc. I will be happy if some one gives a > complete example including how to define context and > where. and how to link it to a web application and > how to call the connection from a pool. I have some > rough idea but the tomcat docs really confused me. > so please help me understand this connection pooling > concept > 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]
RE: connection pooling confusion help needed
Hi All the connection pool properties should be configured in server.xml. You dont have to initialize connections etc. in your init method. you just have to make sure you close your resultset and connection after you are done. Closing it will return it back to the pool. Here is one link from tomcat. Not sure if you took a look at it already http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations Pandu From: Krishnakant Mane <[EMAIL PROTECTED]> Reply-To: "Tomcat Users List" To: tomcat-user@jakarta.apache.org Subject: connection pooling confusion help needed Date: Fri, 25 Mar 2005 19:11:15 + (GMT) hello all, im going to put a web application in java servlets with tomcat 5 on a production ready server for real time use. I am thinking of using connection pooling but I am a bit confused. I have initialised all my connections in the servlet's init method and closed them in distroy method. so these connections are not closed untill the server is turned off. now how will the connection pooling track these un closed connections? and I will like some one to make me understand with an example of how to implement connection pooling using mysql jdbc. I will be happy if some one gives a complete example including how to define context and where. and how to link it to a web application and how to call the connection from a pool. I have some rough idea but the tomcat docs really confused me. so please help me understand this connection pooling concept 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]