From dev-return-20404-apmail-mina-dev-archive=mina.apache.org@mina.apache.org Thu Jul 15 15:19:46 2010 Return-Path: Delivered-To: apmail-mina-dev-archive@www.apache.org Received: (qmail 99092 invoked from network); 15 Jul 2010 15:19:46 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Jul 2010 15:19:46 -0000 Received: (qmail 38194 invoked by uid 500); 15 Jul 2010 15:19:46 -0000 Delivered-To: apmail-mina-dev-archive@mina.apache.org Received: (qmail 38106 invoked by uid 500); 15 Jul 2010 15:19:45 -0000 Mailing-List: contact dev-help@mina.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mina.apache.org Delivered-To: mailing list dev@mina.apache.org Received: (qmail 38095 invoked by uid 99); 15 Jul 2010 15:19:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jul 2010 15:19:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jul 2010 15:19:42 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o6FFBp1g020346 for ; Thu, 15 Jul 2010 15:11:51 GMT Message-ID: <31392920.396661279206711339.JavaMail.jira@thor> Date: Thu, 15 Jul 2010 11:11:51 -0400 (EDT) From: "Niklas Gustavsson (JIRA)" To: dev@mina.apache.org Subject: [jira] Closed: (FTPSERVER-379) DbUserManager doesn't close test connection in ctor In-Reply-To: <17287926.320721278919729959.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/FTPSERVER-379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Niklas Gustavsson closed FTPSERVER-379. --------------------------------------- Assignee: Niklas Gustavsson Fix Version/s: 1.0.5 1.1.0 Resolution: Fixed Now, that was embarrassing :-) Anyways, fixed in rev 964457, thanks for reporting! > DbUserManager doesn't close test connection in ctor > --------------------------------------------------- > > Key: FTPSERVER-379 > URL: https://issues.apache.org/jira/browse/FTPSERVER-379 > Project: FtpServer > Issue Type: Bug > Components: Core > Affects Versions: 1.0.4 > Reporter: Dirk Simonis > Assignee: Niklas Gustavsson > Priority: Minor > Fix For: 1.0.5, 1.1.0 > > > In the class org.apache.ftpserver.usermanager.impl.DbUserManager the ctor doesn't close the test connection and keeps it open until it is close by for example the connection pooling or so. It should be closed directly. > Currently the code is: > try { > // test the connection > createConnection(); > > LOG.info("Database connection opened."); > } catch (SQLException ex) { > LOG.error("Failed to open connection to user database", ex); > throw new FtpServerConfigurationException( > "Failed to open connection to user database", ex); > } > It should be something like this: > Connection con = null; > try { > // test the connection > con = createConnection(); > > LOG.info("Database connection opened."); > } catch (SQLException ex) { > LOG.error("Failed to open connection to user database", ex); > throw new FtpServerConfigurationException( > "Failed to open connection to user database", ex); > } finally{ > closeQuitely(con); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.