Derby
  1. Derby
  2. DERBY-911 Connection.setReadOnly is a no-op in Network Client. It works fine with embedded client.
  3. DERBY-931

Until DERBY-911 gets fixed, document the difference in behavior between Nework Client Driver and Embedded Driver for setReadOnly

    Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.0.2.1
    • Fix Version/s: 10.3.1.4
    • Component/s: Documentation
    • Labels:
      None

      Description

      DERBY-911 "Connection.setReadOnly is a no-op in Network Client. It works fine with embedded client." has more details on this issue but basically, we should document the difference in behavior for setReadOnly between Network Driver and Embedded Driver.

      1. derby931_html.zip
        9 kB
        Laura Stewart
      2. derby931.diff
        5 kB
        Laura Stewart

        Issue Links

          Activity

          Hide
          Jeff Levitt added a comment -

          The following section in the Server-Admin guide:
          http://db.apache.org/derby/docs/dev/adminguide/cadminapps.html

          describes differences between embedded and network server mode. Which topic in this section do you want to see this documented?

          Show
          Jeff Levitt added a comment - The following section in the Server-Admin guide: http://db.apache.org/derby/docs/dev/adminguide/cadminapps.html describes differences between embedded and network server mode. Which topic in this section do you want to see this documented?
          Hide
          Mamta A. Satoor added a comment -

          It can go under topic "Differences between the embedded client and the network client driver". I think we should not put anything specific for Network Client under where we explain setReadOnly (in Reference Manual -> JDBC Referecne -> java.sql.Connection -> java.sql.Connection.setReadOnly) because seems like http://db.apache.org/derby/docs/dev/adminguide/cadminapps.html should be the central place for listing all the differences. Someone who has worked with tracking the differences in the past, please post if that is the right assumption.

          Show
          Mamta A. Satoor added a comment - It can go under topic "Differences between the embedded client and the network client driver". I think we should not put anything specific for Network Client under where we explain setReadOnly (in Reference Manual -> JDBC Referecne -> java.sql.Connection -> java.sql.Connection.setReadOnly) because seems like http://db.apache.org/derby/docs/dev/adminguide/cadminapps.html should be the central place for listing all the differences. Someone who has worked with tracking the differences in the past, please post if that is the right assumption.
          Hide
          Jeff Levitt added a comment -

          OK thanks. So do I just want to add a bullet that says that setReadOnly ignores options in a client-server mode, but works fine in embedded mode?

          Show
          Jeff Levitt added a comment - OK thanks. So do I just want to add a bullet that says that setReadOnly ignores options in a client-server mode, but works fine in embedded mode?
          Hide
          Mamta A. Satoor added a comment -

          I think it is sufficient to add a bullet saying that setReadOnly is a no-op in client-server mode, but works fine in embedded mode.

          Show
          Mamta A. Satoor added a comment - I think it is sufficient to add a bullet saying that setReadOnly is a no-op in client-server mode, but works fine in embedded mode.
          Hide
          Laura Stewart added a comment -

          I propose the following text, but I have a few questions below..

          Title - Differences using the setReadOnly method
          Text - The setReadOnly method performs as expected in the embedded mode, however in the client-server mode the setReadOnly method ignores options

          Questions:
          1. Is this a method, property, attribute, or ???
          2. Should this method be referred to as Connect.setReadOnly?
          3. The "options", are these options that the user sets when they specify this method?
          4. We might want to consider changing "as expected" to something more specific. I looked up Connect.setReadOnly and all our documentation says is that it is supported. What does this method actually do?

          Show
          Laura Stewart added a comment - I propose the following text, but I have a few questions below.. Title - Differences using the setReadOnly method Text - The setReadOnly method performs as expected in the embedded mode, however in the client-server mode the setReadOnly method ignores options Questions: 1. Is this a method, property, attribute, or ??? 2. Should this method be referred to as Connect.setReadOnly? 3. The "options", are these options that the user sets when they specify this method? 4. We might want to consider changing "as expected" to something more specific. I looked up Connect.setReadOnly and all our documentation says is that it is supported. What does this method actually do?
          Hide
          Mamta A. Satoor added a comment -

          Laura, here are answers to your questions.
          1)It is a method.
          2)It should be referred as Connection.setReadOnly
          3 and 4)This method takes a boolean parameter. When true is passed as the parameter, the user is asking that the driver make this Connection as read-only. In embedded mode, this method with true value will correctly mark the Connection as read-only and this can be verified by calling Connection.isReadOnly method which will return true. With Netwrok Client Driver, the Connection.setReadOnly(true) does not make the Connection object as read-only and this can be checked by calling Connection.isReadOnly() which will return false.
          The documentation at http://db.apache.org/derby/docs/10.1/ref/rrefjavcsro.html implies that Derby supports Connection.setReadOnly for both embedded and Network Server mode. But since that is not true, we should document it as a difference between the 2 drivers.

          Just a suggestion for little change to Title text
          Title - Differences using the Connection.setReadOnly method

          Show
          Mamta A. Satoor added a comment - Laura, here are answers to your questions. 1)It is a method. 2)It should be referred as Connection.setReadOnly 3 and 4)This method takes a boolean parameter. When true is passed as the parameter, the user is asking that the driver make this Connection as read-only. In embedded mode, this method with true value will correctly mark the Connection as read-only and this can be verified by calling Connection.isReadOnly method which will return true. With Netwrok Client Driver, the Connection.setReadOnly(true) does not make the Connection object as read-only and this can be checked by calling Connection.isReadOnly() which will return false. The documentation at http://db.apache.org/derby/docs/10.1/ref/rrefjavcsro.html implies that Derby supports Connection.setReadOnly for both embedded and Network Server mode. But since that is not true, we should document it as a difference between the 2 drivers. Just a suggestion for little change to Title text Title - Differences using the Connection.setReadOnly method
          Hide
          Laura Stewart added a comment -

          Mamta, I changed the title and the text.
          Is this now accurate?

          In the embedded mode, when the Connection.setReadOnly method has "true" as
          the parameter, the connection is marked as a read-only connection. When using
          a Network Server, the Connection.setReadOnly(true) method is ignored and the
          connection is not marked as a read-only connection.

          Show
          Laura Stewart added a comment - Mamta, I changed the title and the text. Is this now accurate? In the embedded mode, when the Connection.setReadOnly method has "true" as the parameter, the connection is marked as a read-only connection. When using a Network Server, the Connection.setReadOnly(true) method is ignored and the connection is not marked as a read-only connection.
          Hide
          Mamta A. Satoor added a comment -

          Laura, that looks good.

          Show
          Mamta A. Satoor added a comment - Laura, that looks good.
          Hide
          Laura Stewart added a comment -

          Updated the text. Please review.

          Show
          Laura Stewart added a comment - Updated the text. Please review.
          Hide
          Mamta A. Satoor added a comment -

          The changes to rrefjavcsro.html and cadminappsdiffsreadonly.html look good. The review package derby931_html.zip contained 2 more html files. Were there any changes to those 2 html files for the Jira entry? Those 2 html files are cadminapps810777.html and radminapps810699.html.

          Show
          Mamta A. Satoor added a comment - The changes to rrefjavcsro.html and cadminappsdiffsreadonly.html look good. The review package derby931_html.zip contained 2 more html files. Were there any changes to those 2 html files for the Jira entry? Those 2 html files are cadminapps810777.html and radminapps810699.html.
          Hide
          Laura Stewart added a comment -

          The 2 extra files do not have content changes but were updated to remove a tag that my editor adds to files that I open.

          Show
          Laura Stewart added a comment - The 2 extra files do not have content changes but were updated to remove a tag that my editor adds to files that I open.
          Hide
          Jean T. Anderson added a comment -

          Committed patch derby931.diff revision 432000.

          Show
          Jean T. Anderson added a comment - Committed patch derby931.diff revision 432000.
          Hide
          Andrew McIntyre added a comment -

          This issue has been resolved for over a year with no further movement. Closing.

          Show
          Andrew McIntyre added a comment - This issue has been resolved for over a year with no further movement. Closing.

            People

            • Assignee:
              Laura Stewart
              Reporter:
              Mamta A. Satoor
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development