You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Krishnakant Mane <co...@yahoo.co.uk> on 2005/03/25 20:11:15 UTC

connection pooling confusion help needed

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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: connection pooling confusion help needed

Posted by Preeti Iyer <pr...@gmail.com>.
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 +0000 (GMT), Krishnakant Mane
<co...@yahoo.co.uk> 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: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: connection pooling confusion help needed

Posted by pandu yelamanchili <pa...@hotmail.com>.
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 <co...@yahoo.co.uk>
>Reply-To: "Tomcat Users List" <to...@jakarta.apache.org>
>To: tomcat-user@jakarta.apache.org
>Subject: connection pooling confusion help needed
>Date: Fri, 25 Mar 2005 19:11:15 +0000 (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: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org