You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Trejkaz (JIRA)" <ji...@apache.org> on 2015/02/25 23:53:04 UTC

[jira] [Updated] (DERBY-6796) Impossible to define new sub-subprotocols

     [ https://issues.apache.org/jira/browse/DERBY-6796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Trejkaz updated DERBY-6796:
---------------------------
    Attachment: wrong-prefix-cut.patch

The fix is simple enough.

> Impossible to define new sub-subprotocols
> -----------------------------------------
>
>                 Key: DERBY-6796
>                 URL: https://issues.apache.org/jira/browse/DERBY-6796
>             Project: Derby
>          Issue Type: Bug
>          Components: Miscellaneous
>    Affects Versions: 10.9.1.0
>            Reporter: Trejkaz
>         Attachments: wrong-prefix-cut.patch
>
>
> 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:
> {code}
>             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;
>             }
> {code}
> So you get "rotocol.myproto" as the protocol you have to use in your connection strings.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)