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

Provide component service without OSGi or Spring

Apply templateInsert Lucidchart Diagram
    XMLWordPrintable

Details

    • New Feature
    • Resolution: Fixed
    • Critical
    • 0.18.0
    • None
    • None
    • None
    • All
    • GreenHopper Ranking:
      0|i0yqur:
    • 9223372036854775807
    • Small

    Description

      There should be a lightweight component service provider that does not require including all of the third party dependencies required by OSGi or Spring.

      The motivation is that a product using the component service to generate jobs needs to interact directly with the implementations of Definitions, Property/Properties, RuntimeInfo and eventually instantiate the actual runtime instances.

      There are two possibilities:

      1) Use the standard java ServiceLoader utility to create the catalog of definitions.

      pros: Explicit and known standard, stable and provided since Java 1.6 to Java 9. No additional dependencies.
      cons: Requires a one-line configuration file in the `META-INF/services` directory of the generated jar.

      2) Use a third party library org.reflections:reflections:0.9.10 to scan the classpath for all known implementations of an interface.

      pros: Implicitly discover components without extra maintenance just by the interface.
      cons: Requires scanning all classes in the classpath, brings in third-party dependencies (notably an old version of guava, gson, dom4j), not yet version 1.0.

      Attachments

        Activity

          People

            rskraba Ryan Skraba
            rskraba Ryan Skraba
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: