Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-6796

Impossible to define new sub-subprotocols

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.9.1.0
    • Fix Version/s: None
    • Component/s: Miscellaneous
    • Labels:
      None

      Description

      We discovered this in 10.9.1.0 but I looked at the source in trunk and the issue is still there.

      To define a new sub-subprotocol (or I guess override an existing one?) by setting a system property, you are supposed to set "derby.subSubProtocol.myproto" with the name of your storage factory class as the value.

      Problem is, the way these are loaded strips the wrong prefix off the front of the string. BaseMonitor.java:

                  if (key.startsWith(Property.MODULE_PREFIX)) {
                      tag = key.substring(Property.MODULE_PREFIX.length());
                  } else if (key.startsWith(Property.SUB_SUB_PROTOCOL_PREFIX)) {
                      tag = key.substring(Property.MODULE_PREFIX.length());
                  } else {
                      continue nextModule;
                  }
      

      So you get "rotocol.myproto" as the protocol you have to use in your connection strings.

        Attachments

        1. wrong-prefix-cut.patch
          2 kB
          Trejkaz

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              trejkaz Trejkaz
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: