You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Dirk Simonis (JIRA)" <ji...@apache.org> on 2010/07/12 09:28:49 UTC
[jira] Created: (FTPSERVER-379) DbUserManager doesn't close test
connection in ctor
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
Priority: Minor
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.
[jira] Closed: (FTPSERVER-379) DbUserManager doesn't close test
connection in ctor
Posted by "Niklas Gustavsson (JIRA)" <ji...@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.