code: public static String getTypeName(int type, int length, DataSource ds) throws SQLException {
      Connection con = null;
      try {
        con = ds.getConnection();
        return getTypeName(type, length, con);
      } finally {
        close(con);
      }
    }
docs: Gets the <code>String</code> denoting the specified SQL data type.
  @param type The data type to get the name of.  Valid type values
  consist of the static fields of {@link java.sql.Types}.
  @param length The length to assign to data types for those types
  that require a length (e.g., <code>VARCHAR(n)</code>), or zero
  to indicate that no length is required.
  @param ds The <code>DataSource</code> for which to get the type name.
  @return The name of the type, or <code>null</code> if no such type
  exists.
  @throws SQLException If an error occurs while communicating with the
  database.
  @see java.sql.Types