Derby
  1. Derby
  2. DERBY-1933

Reference Manual updates - Setting attributes for the db connection URL

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.2.1.6
    • Fix Version/s: 10.3.1.4
    • Component/s: Documentation
    • Labels:
      None

      Description

      Setting attributes for the database connection URL:

      Section = Attributes of the Derby database connection URL
      File = http://db.apache.org/derby/docs/10.2/ref/ref-single.html#N2D6D9
      Update =
      This section has 3 examples of setting attributes on database connection URL using Java. One minor suggestion is we should use Java commenting scheme ie /../ instead of – in this sample code.

      Section = encryptionKey section under Setting attributes for the database connection URL
      File = http://db.apache.org/derby/docs/10.2/ref/rrefattribencryptkey.html
      Update =
      The pdf page for encryptionKey has incomplete example. The pdf page only shows jdbc:derby:newDB;create=true;dataEncryption=true;encryptionAlgorithm=DES/CBC/NoPadding; The corresponding html page shows the correct example which looks as follows jdbc:derby:newDB;create=true;dataEncryption=true;encryptionAlgorithm=DES/CBC/NoPadding;encryptionKey=6162636465666768

      1. rrefjdbc10889.html
        5 kB
        Laura Stewart
      2. rrefattribencryptkey.html
        5 kB
        Laura Stewart
      3. derby1933_1.diff
        4 kB
        Laura Stewart

        Activity

        Hide
        Laura Stewart added a comment -

        Committed revision 527289.

        Show
        Laura Stewart added a comment - Committed revision 527289.
        Hide
        Daniel John Debrunner added a comment -

        The wordings in the examples seem strange to me:

        > To configure an existing unencrypted database for encryption, use this JDBC URL:
        > jdbc:derby:salesdb;dataEncryption=true;encryptionKey=6162636465666768

        That doesn't come across to me that it's an example of an URL to encrypt an existing database,
        it reads more as that is the actual URL to use.

        Show
        Daniel John Debrunner added a comment - The wordings in the examples seem strange to me: > To configure an existing unencrypted database for encryption, use this JDBC URL: > jdbc:derby:salesdb;dataEncryption=true;encryptionKey=6162636465666768 That doesn't come across to me that it's an example of an URL to encrypt an existing database, it reads more as that is the actual URL to use.
        Hide
        Laura Stewart added a comment -

        I noticed that too, but when I generate PDF with ant, it doesn't word wrap. Strange.

        On the other hand, the very next file in the PDF has a long example. In DITA, the example shows forced line breaks in the example (no spaces).
        What I am wondering, is if we use line breaks instead, will it mess up users who copy/paste the example to run it? The line breaks aren't part of the example... can the java still be run even though there are multiple lines ithat are copied?

        If the example can be run without problem, then using forced line breakes in the dita tagging is the answer...

        The file that I am referring to is rrefattrib88843.dita = "encryptionProvider=providerName attribute"

        Show
        Laura Stewart added a comment - I noticed that too, but when I generate PDF with ant, it doesn't word wrap. Strange. On the other hand, the very next file in the PDF has a long example. In DITA, the example shows forced line breaks in the example (no spaces). What I am wondering, is if we use line breaks instead, will it mess up users who copy/paste the example to run it? The line breaks aren't part of the example... can the java still be run even though there are multiple lines ithat are copied? If the example can be run without problem, then using forced line breakes in the dita tagging is the answer... The file that I am referring to is rrefattrib88843.dita = "encryptionProvider=providerName attribute"
        Hide
        Kim Haase added a comment -

        This seems like a good solution.

        I notice one oddity, though. In the 10.2 PDF, it is indeed true that in the PDF the long line runs off the page as described in the issue. But in the latest Alpha PDF, there is a line break at the end of the grey block (after "DES/") and the remaining contents appear on the next line. Has there been a toolkit update that might have fixed this so we don't have to?

        Show
        Kim Haase added a comment - This seems like a good solution. I notice one oddity, though. In the 10.2 PDF, it is indeed true that in the PDF the long line runs off the page as described in the issue. But in the latest Alpha PDF, there is a line break at the end of the grey block (after "DES/") and the remaining contents appear on the next line. Has there been a toolkit update that might have fixed this so we don't have to?
        Hide
        Andrew McIntyre added a comment -

        Hi Laura, the changes look fine, but I notice that even with the space, the line doesn't break in the HTML. Is that expected? If it wraps in the PDF but not in the HTML, it might be better to say something like:

        "... There is a space or line break intentionally placed after the dataEncryption=true; attribute in this example to improve display of the URL in the documentation. ..."

        Show
        Andrew McIntyre added a comment - Hi Laura, the changes look fine, but I notice that even with the space, the line doesn't break in the HTML. Is that expected? If it wraps in the PDF but not in the HTML, it might be better to say something like: "... There is a space or line break intentionally placed after the dataEncryption=true; attribute in this example to improve display of the URL in the documentation. ..."
        Hide
        Laura Stewart added a comment -

        Attaching a patch for this issue and 2 html files.

        Show
        Laura Stewart added a comment - Attaching a patch for this issue and 2 html files.
        Hide
        Andrew McIntyre added a comment -

        Breaking the JDBC URL across two lines is fine, but it would probably be good to add a comment that the lines are one continuous URL. Adding some space between the three examples would help also.

        Show
        Andrew McIntyre added a comment - Breaking the JDBC URL across two lines is fine, but it would probably be good to add a comment that the lines are one continuous URL. Adding some space between the three examples would help also.
        Hide
        Laura Stewart added a comment -

        Another way is to insert a line break in the source for the example. Will a new line (without a space) cause problems running this jdbc?
        For example:

        jdbc:derby:newDB;create=true;dataEncryption=true;encryptionAlgorithm=DES/CBC/NoPadding;
        encryptionKey=6162636465666768

        Show
        Laura Stewart added a comment - Another way is to insert a line break in the source for the example. Will a new line (without a space) cause problems running this jdbc? For example: jdbc:derby:newDB;create=true;dataEncryption=true;encryptionAlgorithm=DES/CBC/NoPadding; encryptionKey=6162636465666768
        Hide
        Laura Stewart added a comment -

        The line in question is

        jdbc:derby:newDB;create=true;dataEncryption=true;encryptionAlgorithm=DES/CBC/NoPadding;encryptionKey=6162636465666768

        Show
        Laura Stewart added a comment - The line in question is jdbc:derby:newDB;create=true;dataEncryption=true;encryptionAlgorithm=DES/CBC/NoPadding;encryptionKey=6162636465666768
        Hide
        Laura Stewart added a comment -

        For the encryptionKey, the reason that the example is truncated is that when text is in a codeblock, PDF does not wordwrap.
        The only way to fix this problem is to introduce a space in the line. Is there a logical place that it can be introduced without ruining
        the syntax if a user copies/pastes the example?

        Show
        Laura Stewart added a comment - For the encryptionKey, the reason that the example is truncated is that when text is in a codeblock, PDF does not wordwrap. The only way to fix this problem is to introduce a space in the line. Is there a logical place that it can be introduced without ruining the syntax if a user copies/pastes the example?
        Hide
        Andrew McIntyre added a comment -

        Unsetting Fix Version for unassigned issues.

        Show
        Andrew McIntyre added a comment - Unsetting Fix Version for unassigned issues.
        Hide
        Rick Hillegas added a comment -

        Reassigning to 10.2.3.0.

        Show
        Rick Hillegas added a comment - Reassigning to 10.2.3.0.

          People

          • Assignee:
            Laura Stewart
            Reporter:
            Laura Stewart
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development