Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.10.1.1
    • Fix Version/s: 10.10.1.1
    • Component/s: JDBC
    • Labels:
      None

      Description

      The brokered class tree still separates between the JDBC 2.0 functionality and JDBC 3.0. This leads to unnecessarily many levels of classes (for example, BrokeredPreparedStatement -> BrokeredPreparedStatement30 -> BrokeredStatement40). Another consequence is that BrokeredCallableStatement30 and BrokeredPreparedStatement30 don't have a common base class that could hold shared JDBC 3.0 methods (their common base class is BrokeredPreparedStatement, which is JDBC 2.0), and therefore new JDBC 3.0 PreparedStatement methods are duplicated in the two classes.

      We should fold the JDBC 3.0 classes into the JDBC 2.0 classes so that we can reduce the number of classes and the duplication of code in the brokered statement sub-tree.

      1. d5877-1a.diff
        47 kB
        Knut Anders Hatlen

        Activity

        Hide
        Knut Anders Hatlen added a comment -

        The attached patch makes the following changes to the brokered class tree:

        1) Moved the JDBC 3.0 methods from BrokeredPreparedStatement30 to BrokeredPreparedStatement, to enable reuse of them in BrokeredCallableStatement30.

        2) Removed the JDBC 3.0 PreparedStatement methods from BrokeredCallableStatement30, since they're now inherited from BrokeredPreparedStatement.

        3) Moved the JDBC 3.0 CallableStatement methods from BrokeredCallableStatement30 to BrokeredCallableStatement.

        4) Moved the JDBC 3.0 methods from BrokeredConnection30 to BrokeredConnection.

        5) Removed the now empty BrokeredConnection30, BrokeredPreparedStatement30 and BrokeredCallableStatement30 classes, and made Driver30.newBrokeredConnection() return a BrokeredConnection instance instead of a BrokeredConnection30 instance.

        All the regression tests ran cleanly with the patch.

        Show
        Knut Anders Hatlen added a comment - The attached patch makes the following changes to the brokered class tree: 1) Moved the JDBC 3.0 methods from BrokeredPreparedStatement30 to BrokeredPreparedStatement, to enable reuse of them in BrokeredCallableStatement30. 2) Removed the JDBC 3.0 PreparedStatement methods from BrokeredCallableStatement30, since they're now inherited from BrokeredPreparedStatement. 3) Moved the JDBC 3.0 CallableStatement methods from BrokeredCallableStatement30 to BrokeredCallableStatement. 4) Moved the JDBC 3.0 methods from BrokeredConnection30 to BrokeredConnection. 5) Removed the now empty BrokeredConnection30, BrokeredPreparedStatement30 and BrokeredCallableStatement30 classes, and made Driver30.newBrokeredConnection() return a BrokeredConnection instance instead of a BrokeredConnection30 instance. All the regression tests ran cleanly with the patch.
        Hide
        Knut Anders Hatlen added a comment -

        Committed revision 1365465.

        Show
        Knut Anders Hatlen added a comment - Committed revision 1365465.

          People

          • Assignee:
            Knut Anders Hatlen
            Reporter:
            Knut Anders Hatlen
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development