Derby
  1. Derby
  2. DERBY-4067

ClientConnectionPoolDataSource.getPooledConnection and ClientXADataSource.getXAConnection ignore connection attributes

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.3.3.0, 10.4.2.0, 10.5.1.1
    • Fix Version/s: 10.5.3.2, 10.6.2.4, 10.7.1.1
    • Component/s: Network Client
    • Labels:
      None
    • Urgency:
      Normal

      Description

      The methods CCPDS.getPooledConnection and CXADS.getXAConnection fail to pick up attributes set with setConnectionAttributes(String).

      The current regression tests fail to detect this, because they obtain a connection using getConnection(). I'm not sure if this method should be present in a XADataSource at all, but this problem should be addressed by a separate issue.

        Issue Links

        There are no Sub-Tasks for this issue.

          Activity

          Hide
          Kristian Waagan added a comment -

          My initial fix causes a few tests to fail in J2EEDataSourceTest.
          Derby seems to throw two different kinds of exceptions when there is a bad attribute in the attribute string:
          o XJ212: Invalid attribute syntax: bad
          o XJ028: The URL 'jdbc:derby://localhost:1527/wombat;bad' is not properly formed.

          Show
          Kristian Waagan added a comment - My initial fix causes a few tests to fail in J2EEDataSourceTest. Derby seems to throw two different kinds of exceptions when there is a bad attribute in the attribute string: o XJ212: Invalid attribute syntax: bad o XJ028: The URL 'jdbc:derby://localhost:1527/wombat;bad' is not properly formed.
          Hide
          Knut Anders Hatlen added a comment -

          Triaged for 10.5.2.

          Show
          Knut Anders Hatlen added a comment - Triaged for 10.5.2.
          Hide
          Kristian Waagan added a comment -

          Patch 1a makes the data sources update their state from the contents of the connection attribute string before creating the connection.
          Note that I moved the update of the state before obtaining a log writer, as the log writer construction is dependent on attributes that can be set in the connection attribute string.
          I do plan to backport this fix if possible.

          This patch is a partial fix only, there are several unresolved issues remaining. I expect that these will be addressed as part of DERBY-4719.

          Regression tests passed (12830 tests).
          Patch ready for review.

          Show
          Kristian Waagan added a comment - Patch 1a makes the data sources update their state from the contents of the connection attribute string before creating the connection. Note that I moved the update of the state before obtaining a log writer, as the log writer construction is dependent on attributes that can be set in the connection attribute string. I do plan to backport this fix if possible. This patch is a partial fix only, there are several unresolved issues remaining. I expect that these will be addressed as part of DERBY-4719 . Regression tests passed (12830 tests). Patch ready for review.
          Hide
          Kristian Waagan added a comment -

          Committed to trunk with revision 965793.
          Will wait a bit before I backport and close.

          Show
          Kristian Waagan added a comment - Committed to trunk with revision 965793. Will wait a bit before I backport and close.
          Hide
          Kathey Marsden added a comment -

          Reopen for backport

          Show
          Kathey Marsden added a comment - Reopen for backport
          Hide
          Mike Matrigali added a comment -

          temp assigning to myself while backporting to 10.6 and 10.5

          Show
          Mike Matrigali added a comment - temp assigning to myself while backporting to 10.6 and 10.5
          Hide
          Mike Matrigali added a comment -

          backported to 10.6 and 10.5. resolving and resetting to original owner.

          Show
          Mike Matrigali added a comment - backported to 10.6 and 10.5. resolving and resetting to original owner.
          Hide
          Kristian Waagan added a comment -

          Closing, assuming all work has been done for this issue now.

          Show
          Kristian Waagan added a comment - Closing, assuming all work has been done for this issue now.

            People

            • Assignee:
              Kristian Waagan
              Reporter:
              Kristian Waagan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development