public static void closeConnection(ResultSet rs, Statement stmt, Connection con) {
        closeResultSet(rs);
        closeStatement(stmt);
        closeConnection(con);
    }
Closes a result set, statement and database connection (returning the connection to
the connection pool). This method should be called within the finally section of
your database logic, as in the following example:

<pre>
Connection con = null;
PrepatedStatment pstmt = null;
ResultSet rs = null;
try {
    con = ConnectionManager.getConnection();
    pstmt = con.prepareStatement("select * from blah");
    rs = psmt.executeQuery();
    ....
}
catch (SQLException sqle) {
    Log.error(sqle.getMessage(), sqle);
}
finally {
    ConnectionManager.closeConnection(rs, pstmt, con);
}</pre>

@param rs the result set.
@param stmt the statement.
@param con the connection.
xmppserver/src/main/java/org/jivesoftware/database/DbConnectionManager.java