I've been using PoolMan for over a year and never had this occur... But I'm nor sure how to go about working out what the difference between the way the two systems implement pooling.... Does anyone know why this would occur with DBCP and not with PoolMan? Hamish
> -----Original Message----- > From: teletype [mailto:[EMAIL PROTECTED]] > Sent: Friday, August 30, 2002 10:56 AM > To: Jakarta Commons Users List > Subject: Re: [DBCP]: Connection closed on MSSQL 6.5 > > > Hi, > > We have the same problem on MSSQL 2000. I cannot decide > whether > it is an MSSQL bug or DBCP because however this incident > takes place > on Tyrex also. We're still testing MSSQL without > connection pooling > but because this way the connections has short life-span > the problem > has not been occoured yet. > > Furthermore our DBCP end up in blocking even if I set: > maxActive = 200 > maxIdle = 20 > removeAbandoned = true > removeAbandonedTimeout = 300 > > You can blame me but I'm starting to feel DBCP is immature > for production use. > > > Regards, > tele > > > Barney Hamish <[EMAIL PROTECTED]> wrote: > > > Hi, > > Just started using DBCP(1.0) to do my DB connection > pooling. I use Tomcat > > 3.2.1 and MSSQL 6.5. I had been using PoolMan but decided > to switch to > > support multiple pools, which I couldn't seem to be able > to get working > > under poolman. I have two problems: > > The connection keeps dropping out. I keep recieving SQL > exceptions saying > > the connection is closed, sometimes in the middle of > retrieving my query > > results. > > eg. > > java.sql.SQLException: Connection is closed. > > > > This problem never occured with PoolMan. Is anyone aware > of any differences > > between the two packages that may cause this problem? > > > > I decided to put in some debugging code when I establish > the connection. > > > > PoolingDriver poolingDriver = (PoolingDriver) > > DriverManager.getDriver(defDbURL); > > ObjectPool objectPool = poolingDriver.getPool > ("/sql_databases"); > > System.out.println("Active - " + objectPool.getNumActive > () + " Idle - " + > > objectPool.getNumIdle()); > > > > but that gives me a negative number of active connections > (eg. see below) > > Active - -5 Idle - 0 > > > > The number of active connections seems to decrease every > time I request a > > new one. > > > > Find below my configuration file for DBCP. Has anyone > encountered similar > > problems or know what I'm doing wrong? > > > > Thanks, > > Hamish > > > > <object > class="org.apache.commons.dbcp.PoolableConnectionFactory" > > xmlns="http://apache.org/xml/xmlns/jakarta/commons/jocl"> > > <object > > > class="org.apache.commons.dbcp.DriverManagerConnectionFactor > y"> > > <!--DB Connection String--> > > <string > > value="jdbc:inetdae7://XXXXXXX:1433? > database=sql_databases"/> > > > > <!--DB Connection Properties--> > > <object class="java.util.Properties" > null="true"/> > > </object> > > > > <object > class="org.apache.commons.pool.impl.GenericObjectPool"> > > <!--Factory object--> > > <object > > class="org.apache.commons.pool.PoolableObjectFactory" > null="true"/> > > > > <!--Max Active Connections--> > > <int value="20"/> > > > > <!--When Exhausted Action--> > > <byte value="1"/><!--Blocks when the pool > is exhausted--> > > > > <!--Max Wait--> > > <long value="2000"/> > > > > <!--Max Idle--> > > <int value="-15"/> > > > > <!--Test On Borrow--> > > <boolean value="true"/> > > > > <!--Test on Return--> > > <boolean value="true"/> > > > > <!--time Between Eviction Runs (Millis)--> > > <long value="10000"/> > > > > <!--Number of test per eviction run--> > > <int value="5"/> > > > > <!--Minimum evictable idle time (Millis)--> > > <long value="5000"/> > > > > <!--Test when idle--> > > <boolean value="true"/> > > </object> > > > > <object > > > class="org.apache.commons.pool.impl.GenericKeyedObjectPoolFa > ctory"> > > <!--Factory object--> > > <object > > > class="org.apache.commons.pool.KeyedPoolableObjectFactory" > null="true"/> > > > > <!--Max Active Connections--> > > <int value="5"/> > > > > <!--When Exhausted Action--> > > <byte value="1"/> > > > > <!--Max Wait--> > > <long value="2000"/> > > > > <!--Max Idle--> > > <int value="5"/> > > > > <!--Test On Borrow--> > > <boolean value="true"/> > > > > <!--Test on Return--> > > <boolean value="true"/> > > > > <!--time Between Eviction Runs (Millis)--> > > <long value="10000"/> > > > > <!--Number of test per eviction run--> > > <int value="5"/> > > > > <!--Minimum evictable idle time (Millis)--> > > <long value="5000"/> > > > > <!--Test when idle--> > > <boolean value="true"/> > > </object> > > > > <!--Validation query--> > > <string value="SELECT getDate()"/> > > > > <!--Default read-only--> > > <boolean value="false"/> > > > > <!--Default AutoCommit--> > > <boolean value="true"/> > > </object> > > > > -- > > To unsubscribe, e-mail: <mailto:commons-user- > [EMAIL PROTECTED]> > > For additional commands, e-mail: <mailto:commons-user- > [EMAIL PROTECTED]> > > > > > > > > > > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
