You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Marco Baiguera <ma...@bresciaonline.it> on 2003/09/18 16:02:16 UTC

howto monitor dbcp connection usage?

i'd like to monitor (log) dbcp connection pool usage.
i'm using tomcat 4.1.27 with dbcp 1.0 and mysql (j-connector 3.0.8 - mysql 3.23) 
i'm investigating if my db refuses or closes the connection in fact calling datasource.getconnection sometimes returns a closed conn (?)
any hint?
thanks





Re: howto monitor dbcp connection usage?

Posted by Peter Lin <tc...@yahoo.com>.
 
I'm kinda swamped today. a high level description is this.
 
1. log4j for logging
2. added configuration keys to web.xml
3. implement a database abstraction layer
   I. reads connection parameters from web.xml
   II. use connection pooling driver
   III. create a datasource interface for getConnection, close and so on
   IV. implement logic for logging
4. application uses the connection just like any other jdbc connection
 
don't have time to go into detail. hope that helps.
 
peter


Marco Baiguera <ma...@bresciaonline.it> wrote:
> what I've done in the past is write a dbmanager that uses the underlying driver. my dbmanager then implements simple logging and is configurable through web.xml.
can you explain and/or give an example?
thx

----- Original Message ----- 
From: "Peter Lin" 
To: "Tomcat Users List" 
Sent: Thursday, September 18, 2003 4:09 PM
Subject: Re: howto monitor dbcp connection usage?


> 
> what I've done in the past is write a dbmanager that uses the underlying driver. my dbmanager then implements simple logging and is configurable through web.xml.
> 
> 
> peter
> 
> Marco Baiguera wrote:
> i'd like to monitor (log) dbcp connection pool usage.
> i'm using tomcat 4.1.27 with dbcp 1.0 and mysql (j-connector 3.0.8 - mysql 3.23) 
> i'm investigating if my db refuses or closes the connection in fact calling datasource.getconnection sometimes returns a closed conn (?)
> any hint?
> thanks
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software



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


---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Re: howto monitor dbcp connection usage?

Posted by Marco Baiguera <ma...@bresciaonline.it>.
> what I've done in the past is write a dbmanager that uses the underlying driver.  my dbmanager then implements simple logging and is configurable through web.xml.
can you explain and/or give an example?
thx

----- Original Message ----- 
From: "Peter Lin" <tc...@yahoo.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Thursday, September 18, 2003 4:09 PM
Subject: Re: howto monitor dbcp connection usage?


> 
> what I've done in the past is write a dbmanager that uses the underlying driver.  my dbmanager then implements simple logging and is configurable through web.xml.
>  
>  
> peter
> 
> Marco Baiguera <ma...@bresciaonline.it> wrote:
> i'd like to monitor (log) dbcp connection pool usage.
> i'm using tomcat 4.1.27 with dbcp 1.0 and mysql (j-connector 3.0.8 - mysql 3.23) 
> i'm investigating if my db refuses or closes the connection in fact calling datasource.getconnection sometimes returns a closed conn (?)
> any hint?
> thanks
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software



Re: howto monitor dbcp connection usage?

Posted by Marco Baiguera <ma...@bresciaonline.it>.
> what I've done in the past is write a dbmanager that uses the underlying driver.  my dbmanager then implements simple logging and is configurable through web.xml.
can you explain and/or give an example?
thx

----- Original Message ----- 
From: "Peter Lin" <tc...@yahoo.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Thursday, September 18, 2003 4:09 PM
Subject: Re: howto monitor dbcp connection usage?


> 
> what I've done in the past is write a dbmanager that uses the underlying driver.  my dbmanager then implements simple logging and is configurable through web.xml.
>  
>  
> peter
> 
> Marco Baiguera <ma...@bresciaonline.it> wrote:
> i'd like to monitor (log) dbcp connection pool usage.
> i'm using tomcat 4.1.27 with dbcp 1.0 and mysql (j-connector 3.0.8 - mysql 3.23) 
> i'm investigating if my db refuses or closes the connection in fact calling datasource.getconnection sometimes returns a closed conn (?)
> any hint?
> thanks
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software



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


Re: howto monitor dbcp connection usage?

Posted by Peter Lin <tc...@yahoo.com>.
 
what I've done in the past is write a dbmanager that uses the underlying driver.  my dbmanager then implements simple logging and is configurable through web.xml.
 
 
peter

Marco Baiguera <ma...@bresciaonline.it> wrote:
i'd like to monitor (log) dbcp connection pool usage.
i'm using tomcat 4.1.27 with dbcp 1.0 and mysql (j-connector 3.0.8 - mysql 3.23) 
i'm investigating if my db refuses or closes the connection in fact calling datasource.getconnection sometimes returns a closed conn (?)
any hint?
thanks





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


---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software