Revision 56916
Added by Ioannis Diplas over 4 years ago
AbstractDAO.java | ||
---|---|---|
91 | 91 |
} |
92 | 92 |
} |
93 | 93 |
|
94 |
protected void closeConnection(Connection con) throws DaoException {
|
|
94 |
protected void closeConnection(Connection con) { |
|
95 | 95 |
if(con!= null) { |
96 |
try { |
|
97 |
con.close(); |
|
98 |
} catch (SQLException e) { |
|
99 |
logger.error("Failed to close connection with Database", e); |
|
100 |
throw new DaoException(e); |
|
101 |
} |
|
96 |
DataSourceUtils.releaseConnection(con, datasource); |
|
102 | 97 |
} |
103 | 98 |
} |
104 | 99 |
|
Also available in: Unified diff
Now releasing connections instead of closing them