dcsimg
Regarding Connection Pooling
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Samar_Dave
Posted On:   Thursday, April 12, 2001 08:18 AM

Hi, I am using a Connection Pool class, which creates a pool of 5 connections. I am using this the Database Access class in the business logic classes. The problem is that when monitored on the database server, it shows 26 connections open for the same database instance, where it should only be 5. Can you suggest the exact method of monitoring hte database server for open connections? Also in a Java class if i am firing more than one SQL queries, do i need to fetch a connection and release that connection for each query or just open a single connection once and use it for all the queries and then release the connection in the "Finally" block of the "try....catch"? Immediate response will be appreciated.    More>>

Hi,
I am using a Connection Pool class, which creates a pool of 5 connections. I am using this the Database Access class in the business logic classes. The problem is that when monitored on the database server, it shows 26 connections open for the same database instance, where it should only be 5.
Can you suggest the exact method of monitoring hte database server for open connections?

Also in a Java class if i am firing more than one SQL queries, do i need to fetch a connection and release that connection for each query or just open a single connection once and use it for all the queries and then release the connection in the "Finally" block of the "try....catch"?
Immediate response will be appreciated.
Thanks

   <<Less

Re: Regarding Connection Pooling

Posted By:   usman_khan  
Posted On:   Friday, April 13, 2001 02:03 AM

Are u using stacks or Queue in connection pooling?? there might be problem in your code....... secondly you don't need to open connection and then release the connection for each queries but make sure you close the resultSet every time...... :-)
About | Sitemap | Contact