You'll have to release the connection to the pool and _NOT_ close the
connection. It's something like this :

        * Create a resource pool that maintains the pool
        * release the resource from the pool upon request ( if the
resource Is already there in the pool and can be utilized )
        * Else create a resource ( if the resource pool limit is not
reached ) upon request and once the resource is used, _RELEASE_ it to
the pool and _NOT_CLOSE_ the connection.
        * Else wait for a resource to be released from one of the
threads ( this is tricky, say there's a DB resource leak and all the
resources in the pool are leaks, then you'll run into a freeze. Your
waiting thread will have to wait indefinitely for a DB resource to be
released while they are actually leaks )

Hope this helps.
Lenin

-----Original Message-----
From: Abh N [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 05, 2006 8:16 AM
To: users@tomcat.apache.org
Subject: need inputs on connection pool

Hi,
   
  we are implementing the connection pooling in our application.
   
  connections are taken from the data source. 
   
  After getting the connection i need to confirm whether i have to
explictly close the connection
   like conn.close ()
   
  i want to know in above case whether connection will be release to the
pool or will get closed.
   
  i have a doubt as in above case the connection might be getting closed
and might not be available for re-use.

   

                                
---------------------------------
 Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

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

Reply via email to