tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kwan, Kenneth Y" <Kenneth.Y.K...@pccw.com>
Subject [DBCP] Strange NumActive & NumIdle return values
Date Wed, 14 May 2003 04:35:22 GMT
Hello

Has anyone encountered NumActive() returned negative value? Below is output
from my JSP

MaxActive: 20 MaxWait: 10000 NumActive: -14 numIdle: 15 

and JSP is very simple:

Context ctx = new InitialContext();
if(ctx == null ) 
	throw new Exception("No Context");
BasicDataSource ds =
(BasicDataSource)ctx.lookup("java:comp/env/jdbc/testDB");
out.print(" MaxActive: " + ((BasicDataSource) ds).getMaxActive());
out.print(" MaxWait: " + ((BasicDataSource) ds).getMaxWait());
out.print(" NumActive: " + ((BasicDataSource) ds).getNumActive());
out.print(" numIdle: " + ((BasicDataSource) ds).getNumIdle());

I'm using MySQL 4.0 and have tried Connector/J 3.0.7 & Connector/J 2.0.14

Anyone has idea on this?

Kenneth

Mime
View raw message