title: Anything wrong with using a DB wrapper Class like this?
body: <p>Is there anything wrong with using a parent function to handle all the messy catch/finally stuff in a connection pool?</p>
  
  <pre><code>public Connection getConnection() {
      try {
          return this.dataSource.getConnection();
      } catch (SQLException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
      return null;
  }
  
  public ResultSet executeQuery(Connection connection, PreparedStatement stmt) {
      try {
          return stmt.executeQuery();
      } catch (SQLException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      } finally {
          if (stmt != null) {
              try {
                  stmt.close();
              } catch (SQLException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              }
          }
          if (connection != null) {
              try {
                  connection.close();
              } catch (SQLException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              }
          }
      }
      return null;
  }
  </code></pre>