Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4940060

SPEC BUG: javax.sql.rowset.BaseRowSet.setUrl(String)/setDataSouceName inconsiste

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • 5.0
    • docs
    • sparc
    • solaris_2.6



      Name: sdR10048 Date: 10/18/2003


      Filed By : SPB JCK team (###@###.###)
      JDK : java full version "1.5.0-beta-b23"



      Specification excerpt:
      ======================
      --------- J2SE API spec v.1.5 ---------
      ...
      public void setDataSourceName(java.lang.String name)
      Sets the data source property name for this RowSet object to
      the given logical name for a data source and sets this RowSet
      object's URL property to null.

      Users should set either the url or data source name property.
      The driver will use the property set most recently to establish a connection.

      ===

      public void setUrl(java.lang.String url)
                  throws java.sql.SQLException
      Sets the URL property for this RowSet object to the given String object.
      This URL is used when the connection is created using a JDBC
      technology-enabled driver. Please refer to the vendor JDBC driver
      documentation to determine the correct format of URL for the specific
      JDBC driver in use.

      Setting this property is optional. The driver will use either a URL or a
      data source name to create a connection, whichever was specified most
      recently. If an application uses a URL, it must load a JDBC driver that
      accepts the URL before it uses the JDBC RowSet to connect to a database.
      The JDBC RowSet will use the URL internally to create a database
      connection in order to read or write data.

      Parameters:
      url - a String object that contains the JDBC URL that will be used to
      establish the connection for this JDBC RowSet; may be null
      Throws:
      java.sql.SQLException - if an error occurs setting this or updating URL value.
      ...
      ---------- end-of-excerpt ---------------

      Problem description
      ===================
      There is sort of inconsistency in setDataSourceName/setUrl method pair.

      The first method's javadoc says that it sets URL property to null. But
      the second one's javadoc says nothing similar to it (I mean setting data
      source name property to null).

      ======================================================================

            mfishersunw Maydene Fisher (Inactive)
            dsvsunw Dsv Dsv (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: