Return-Path: X-Original-To: apmail-empire-db-commits-archive@www.apache.org Delivered-To: apmail-empire-db-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4B7E6108A6 for ; Tue, 27 Aug 2013 09:27:03 +0000 (UTC) Received: (qmail 67688 invoked by uid 500); 27 Aug 2013 09:27:03 -0000 Delivered-To: apmail-empire-db-commits-archive@empire-db.apache.org Received: (qmail 67660 invoked by uid 500); 27 Aug 2013 09:27:03 -0000 Mailing-List: contact commits-help@empire-db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: empire-db-dev@empire-db.apache.org Delivered-To: mailing list commits@empire-db.apache.org Received: (qmail 67371 invoked by uid 500); 27 Aug 2013 09:26:53 -0000 Delivered-To: apmail-incubator-empire-db-commits@incubator.apache.org Received: (qmail 67351 invoked by uid 99); 27 Aug 2013 09:26:52 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Aug 2013 09:26:52 +0000 Date: Tue, 27 Aug 2013 09:26:51 +0000 (UTC) From: "Francis De Brabandere (JIRA)" To: empire-db-commits@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (EMPIREDB-191) The spring example not release connection cause connection pool exhausted. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/EMPIREDB-191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Francis De Brabandere reassigned EMPIREDB-191: ---------------------------------------------- Assignee: Francis De Brabandere > The spring example not release connection cause connection pool exhausted. > -------------------------------------------------------------------------- > > Key: EMPIREDB-191 > URL: https://issues.apache.org/jira/browse/EMPIREDB-191 > Project: Empire-DB > Issue Type: Bug > Components: Website > Affects Versions: empire-db-2.4.1 > Reporter: gdiao > Assignee: Francis De Brabandere > Priority: Minor > > public Integer insertEmployee(String firstName, String lastName, String gender, int departmentId) { > SampleDB db = getDB(); > Connection conn = getConnection(); > DBRecord rec = new DBRecord(); > rec.create(db.EMPLOYEES); > rec.setValue(db.EMPLOYEES.FIRSTNAME, firstName); > rec.setValue(db.EMPLOYEES.LASTNAME, lastName); > rec.setValue(db.EMPLOYEES.GENDER, gender); > rec.setValue(db.EMPLOYEES.DEPARTMENT_ID, departmentId); > rec.update(conn); > // Return Employee ID > return rec.getInt(db.EMPLOYEES.EMPLOYEE_ID); > } > above code should be coupled with a releaseConnection(conn); otherwise, above code will use up all the connection in connection pool. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira