Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 12273 invoked from network); 30 Aug 2005 00:36:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 Aug 2005 00:36:08 -0000 Received: (qmail 83856 invoked by uid 500); 30 Aug 2005 00:36:06 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 82953 invoked by uid 500); 30 Aug 2005 00:36:03 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 82940 invoked by uid 99); 30 Aug 2005 00:36:02 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Aug 2005 17:36:02 -0700 X-ASF-Spam-Status: No, hits=2.3 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,FROM_ENDS_IN_NUMS,MSGID_FROM_MTA_HEADER,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of joehansen12@hotmail.com designates 65.54.175.28 as permitted sender) Received: from [65.54.175.28] (HELO hotmail.com) (65.54.175.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Aug 2005 17:36:17 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Mon, 29 Aug 2005 17:36:00 -0700 Message-ID: Received: from 65.54.175.200 by by104fd.bay104.hotmail.msn.com with HTTP; Tue, 30 Aug 2005 00:36:00 GMT X-Originating-IP: [65.54.175.200] X-Originating-Email: [joehansen12@hotmail.com] X-Sender: joehansen12@hotmail.com From: "Joe Hansen" To: commons-user@jakarta.apache.org Subject: DBCP removeAbandoned not working! Date: Tue, 30 Aug 2005 00:36:00 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 30 Aug 2005 00:36:00.0685 (UTC) FILETIME=[CB8E9DD0:01C5ACFA] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N hi all, I am using DBCP 1.2.1. Why is the abandoned connection NOT returned after 5 seconds? Please help. Thanks, Joe. The output of the following program is as follows: Loading underlying JDBC driver. Creating connection 1. AbandonedObjectPool is used (org.apache.commons.dbcp.AbandonedObjectPool@21b6d) LogAbandoned: false RemoveAbandoned: true RemoveAbandonedTimeout: 300 Creating connection 2. org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted import java.sql.Connection; import javax.sql.DataSource; import java.util.Properties; import org.apache.commons.dbcp.BasicDataSourceFactory; public class ManualPoolingDriverExample2 { public static void main(String[] args) { System.out.println("Loading underlying JDBC driver."); Properties dataSourceProperties = new Properties(); dataSourceProperties.setProperty("factory", "org.apache.commons.dbcp.BasicDataSourceFactory"); dataSourceProperties.setProperty("driverClassName", "com.progress.sql.jdbc.JdbcProgressDriver"); dataSourceProperties.setProperty("url", "jdbc:jdbcprogress:T:localhost:9199:test"); dataSourceProperties.setProperty("username", "joe"); dataSourceProperties.setProperty("password", "joe1"); dataSourceProperties.setProperty("maxActive", "1"); dataSourceProperties.setProperty("maxWait", "10000"); // wait for 10 secs dataSourceProperties.setProperty("removeAbandoned", "true"); dataSourceProperties.setProperty("logAbandoned", "false"); dataSourceProperties.setProperty("removeAbandonedTimeout", "5"); // return abandonded connections after 5 secs try { DataSource dataSource = BasicDataSourceFactory.createDataSource(dataSourceProperties); Connection conn = null; System.out.println("Creating connection 1."); conn = dataSource.getConnection(); System.out.println("Creating connection 2."); conn = dataSource.getConnection(); System.out.println("Done creating connections."); } catch (Exception ex) { ex.printStackTrace(); } } } _________________________________________________________________ On the road to retirement? Check out MSN Life Events for advice on how to get there! http://lifeevents.msn.com/category.aspx?cid=Retirement --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org