Uploaded image for project: 'Service Binding Manager'
  1. Service Binding Manager
  2. SVCBIND-5

Support for escaped IPv6 literals

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.2.0.Final
    • Component/s: Core
    • Labels:
      None
    • Affects:
      Documentation (Ref Guide, User Guide, etc.), Release Notes, Compatibility/Configuration

      Description

      Richard Achmatowicz wrote on JBAS-8455:

      When dealing with Strings and string replacement, the ServiceBindingManager uses a method called StringReplacementServiceBindingValueSourceImpl.replaceHostAndPort() to look through the input string passed as a parameter to getStringBinding(), and it looks for all instances of ${host} and ${port} in the string and simply replaces these tokens with the actual hostname and port which are in the ServiceBinding instance for that service name. The change I propose is as follows:

      • introduce a new substitution parameter ${hostforurl} which returns either:
      • the hostname stored in the ServiceBinding.hostname field, if this is the case
      • the IPv4 literal stored in the ServiceBinding.hostname field, if this is the case
      • the IPv6 literal stored in the ServiceBinding.hostname field, if this is the case, but now enclosed in square brackets
      • add a few lines of code to check if the hostname was an IPv6 literal, and if so, add the brackets

      With this in place, a URL example could be written as

      <value-factory bean="ServiceBindingManager" method="getStringBinding">
      <parameter>jboss.web:service=WebServer</parameter>
      <parameter>${hostforurl}:${port}/invoker/EJBInvokerServlet</parameter>
      </value-factory>

      and the URL would be well formed, even if the bind address was an IPv6 literal. Thus, by changing the URL templates in the bean config files, we could at least get all our services started with the correct attributes. If a service or code section dd not involve the service binding manager, then this would not help.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rachmato Richard Achmatowicz
              Reporter:
              brian.stansberry Brian Stansberry
              Archiver:
              samahaja Sagar Mahajan

                Dates

                Created:
                Updated:
                Resolved:
                Archived: