Uploaded image for project: 'Talend Component Kit'
  1. Talend Component Kit
  2. TCOMP-1851

HttpClient implementation class is a Service with State

Apply templateInsert Lucidchart DiagramXMLWordPrintable

    • Hide

      Build a pipeline with marketo input --> marketo output (for example), each with a different EndPoint on datastore.

      This will have unexpected behavior.

      Show
      Build a pipeline with marketo input --> marketo output (for example), each with a different EndPoint on datastore. This will have unexpected behavior.
    • All
    • Small

      HttpClient subclasses are treated by Component Manager as Service, mean there is a single instance for container.

      This is not compliant with base() method of this interface which is transform by HttpClientFactoryImpl in "base" field on Handler class.
      As a consequence, if you have a pipeline with twice same connector on input and output; that doesn't share same base (for an upgrade version for example); the single instance of service will have either value of input, either of output; and, in both case, lead to an error.

      While connectors need to define a "base", like in marketo, and this "base" is not known at compile time (not constant); the base method should be replace by a @Base parameter annotation (don't know if name Base is clear enough or if we may change it to EndPoint or whatever).

      First step, we can deprecate base() method of HttpClient interface and add @Base (or @EndPoint) annotation; and modify TCK to let it work with both.
      Second Step, on version 2.x, make a breaking change, and remove base() method.

            emmanuel_g emmanuel gallois
            clesaec Christophe LeSaec
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: