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

javax.sql.rowset.BaseRowSet: default concurrency ambiguity

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 5.0
    • 5.0
    • docs
    • beta2
    • 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 ---------
      ...
      The following is true of a default BaseRowSet instance:
      . . .
      In other words, when a default RowSet object is created, it is as if the following BaseRowSet methods had been called:
      . . .
           setConcurrency(ResultSet.CONCUR_READ_ONLY);
      . . .
      ===

      public int getConcurrency()
                         throws java.sql.SQLException
      Returns the concurrency for this JDBC RowSet. The concurrency is initially
      determined by the statement that created the JDBC RowSet. The JDBC
      RowSet can call the method setConcurrency at any time to change its
      concurrency. The default is CONCUR_UPDATABLE.

      For disconnected JDBC RowSet implementations such as the CachedRowSet
       that operate in a disconnected environment the SyncFactory SPIs and
      SyncProvider mechanisms offer complimentary concurrency options. The
       options described below are pertinant only to connected JDBC RowSet's
       such as the JdbcRowSet.

      Returns:
      the concurrency type for this JDBC RowSet object, which must be one of the
      following: ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
      Throws:
      java.sql.SQLException - if an error occurs determinig set concurrency of the
      JDBC RowSetl or if no concurrency has been set.
      ...
      ---------- end-of-excerpt ---------------

      Problem description
      ===================
      BaseRowSet describe different default concurrency property value.
      CONCUR_READ_ONLY at the class definition and CONCUR_UPDATABLE at
      the getConcurrency() method specification.

      Also in the getConcurrency() spec:
       ("Throws:
        java.sql.SQLException -
        if an error occurs determinig set concurrency of the JDBC RowSetl
        or if no concurrency has been set.")

      "or if no concurrency has been set." is redundant since default BaseRowSet
      is initialized with setConcurrency(ResultSet.CONCUR_READ_ONLY) as spec says.

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

            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: