Skip to content

Commit 27d47be

Browse files
committed
feat(QTDI-1914): Update README.md after refactoring.
1 parent a17adc6 commit 27d47be

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

  • sample-parent/sample-features/loading-analysis

sample-parent/sample-features/loading-analysis/README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Dynamic Dependencies Module
1+
# Loading Analysis Module
22

33
## Overview
44

5-
The `dynamic-dependencies` module provides several TCK connector plugins designed to validate the `@DynamicDependencies` feature integration, at design time and runtime. It contains several connectors organized into two categories:
5+
The `loading-analysis` module provides several TCK connector plugins designed to validate the `@DynamicDependencies` feature integration, at design time and runtime. It contains several connectors organized into two categories:
66

77
- Firsts are connectors with a service that inherits `AbstractDynamicDependenciesService` and that check:
88
- All supported ways to call `@DynamicDependencies` annotated services, according to expected configuration types
@@ -52,10 +52,10 @@ As you can see in the previous example, the annotated `@DynamicDependencies` ser
5252
(_This documentation will not mention the deprecated `DynamicDependencySupported` provided by the `tDataprepRun` connector._)
5353

5454
So, 3 TCK modules have been designed, each one provide a service with one of those parameter types:
55-
- dynamic-dependencies-with-datastore
56-
- dynamic-dependencies-with-dataset
57-
- dynamic-dependencies-with-dynamic-dependencies-configuration
58-
Those 3 modules has the module `dynamic-dependencies-common` as dependency. They all have a service that inherits `AbstractDynamicDependenciesService`, that implements the `@DynamicDependencies` annotated method.
55+
- loading-dependencies-with-datastore
56+
- loading-dependencies-with-dataset
57+
- loading-dependencies-with-dynamicDependenciesConfiguration
58+
Those 3 modules has the module `loading-dependencies-common` as dependency. They all have a service that inherits `AbstractDynamicDependenciesService`, that implements the `@DynamicDependencies` annotated method.
5959

6060
#### How to configure them?
6161
Each of those TCK modules provide an input connector in which you can configure:
@@ -113,12 +113,12 @@ It will generate TCK/records containing those fields:
113113
+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
114114
| key | value |
115115
+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
116-
| maven | org.talend.sdk.samplefeature.dynamicdependencies:dynamic-dependencies-common:N/A |
116+
| maven | org.talend.sdk.component.loading-analysis:loading-dependencies-common:N/A |
117117
| clazz | org.talend.sdk.component.sample.feature.loadinganalysis.config.Dependency |
118118
| is_loaded | true |
119119
| connector_classloader | org.talend.sdk.component.classloader.ConfigurableClassLoader@9ebe38b |
120120
| clazz_classloader | org.talend.sdk.component.classloader.ConfigurableClassLoader@9ebe38b |
121-
| from_location | jar:file:/C:/tmp/202601_dyndeps_exports/Talend-Studio-20260121_1719-V8.0.1/configuration/.m2/repository/org/talend/sdk/samplefeature/dynamicdependencies/dynamic-dependencies-common/1.89.0-SNAPSHOT/dynamic-dependencies-common-1.89.0-SNAPSHOT.jar!/org/talend/sdk/component/sample/feature/dynamicdependencies/config/Dependency.class |
121+
| from_location | jar:file:/C:/tmp/202601_dyndeps_exports/Talend-Studio-20260121_1719-V8.0.1/configuration/.m2/repository/org/talend/sdk/component/loading-analysis/loading-dependencies-common/1.89.0-SNAPSHOT/loading-dependencies-common-1.89.0-SNAPSHOT.jar!/org/talend/sdk/component/sample/feature/loadinganalysis/config/Dependency.class |
122122
| is_tck_container | false |
123123
| first_record | null |
124124
| root_repository | C:/tmp/202601_dyndeps_exports/Talend-Studio-20260121_1719-V8.0.1/configuration/.m2/repository |
@@ -127,7 +127,7 @@ It will generate TCK/records containing those fields:
127127
| comment | Check static dependency. |
128128
+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
129129
```
130-
In this exemple we can see that we try to load the class `org.talend.sdk.component.sample.feature.loadinganalysis.config.Dependency` from the dependency `org.talend.sdk.samplefeature.dynamicdependencies:dynamic-dependencies-common`.
130+
In this exemple we can see that we try to load the class `org.talend.sdk.component.sample.feature.loadinganalysis.config.Dependency` from the dependency `org.talend.sdk.component.loading-analysis:loading-dependencies-common`.
131131
The version is `N/A` since it is not needed, the dependency is a static one and is loaded at build time.
132132
The `DynamicDependencyWithXxxInput` is well loaded from `org.talend.sdk.component.classloader.ConfigurableClassLoader` as the class to test.
133133

@@ -199,7 +199,7 @@ In that example, we can see that we don't try to load a class, `clazz: N/A`, but
199199
```
200200

201201
## Check SPI and resource loading
202-
The `dynamic-depdencies-with-spi` provides an input connector that will try to load:
202+
The `loading-services-and-resources` provides an input connector that will try to load:
203203
- The SPI implementation from a static dependency
204204
- The SPI implementation from a dynamic dependency
205205
- The SPI implementation provided by the runtime
@@ -222,7 +222,7 @@ It generates TCK records containing those fields:
222222
- `workingDirectory`: the value of the property `user.dir`
223223

224224
### The first record checks SPI implementation provided by a static dependency
225-
The SPI implementation is provided by the dependency `org.talend.sdk.samplefeature.dynamicdependencies:service-provider-from-dependency`.
225+
The SPI implementation is provided by the dependency `org.talend.sdk.component.loading-analysis:service-provider-from-dependency`.
226226
```
227227
+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
228228
| key | value |
@@ -241,7 +241,7 @@ The SPI implementation is provided by the dependency `org.talend.sdk.samplefeatu
241241
We can see that the SPI implementation has been well loaded, since the value is retrieved, and has been loaded by the container classloader `ConfigurableClassLoader` as expected.
242242

243243
### The second record checks SPI implementation provided by a dynamic dependency
244-
The spi implementation is provided by the dependency `org.talend.sdk.samplefeature.dynamicdependencies:service-provider-from-dynamic-dependency`. It is returned by the `@DynamicDependency` service.
244+
The spi implementation is provided by the dependency `org.talend.sdk.component.loading-analysis:service-provider-from-dynamic-dependency`. It is returned by the `@DynamicDependency` service.
245245
```
246246
+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
247247
| key | value |
@@ -260,7 +260,7 @@ The spi implementation is provided by the dependency `org.talend.sdk.samplefeatu
260260
In this second record, we see that the SPI implementation has been loaded from the `ConfigurableClassLoader`.
261261

262262
### The third record checks SPI implementation provided by the runtime
263-
The spi implementation is provided by the dependency `org.talend.sdk.samplefeature.dynamicdependencies:service-provider-from-external-dependency`. In the studio, we can add this library using the `tLibraryLoad` connector.
263+
The spi implementation is provided by the dependency `org.talend.sdk.component.loading-analysis:service-provider-from-external-dependency`. In the studio, we can add this library using the `tLibraryLoad` connector.
264264
```
265265
+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
266266
| key | value |
@@ -305,13 +305,13 @@ Here is the json documentation contained in the `value` field:
305305
}
306306
```
307307
The `DynamicDependenciesWithSPIInput` connector tries to load some resources using `DynamicDependenciesWithSPIService.class.getClassLoader().getResourceAsStream(resource)`:
308-
- `FROM_DEPENDENCY/resource.properties`: this resource exists only in `org.talend.sdk.samplefeature.dynamicdependencies:service-provider-from-dependency` module. The resource value is copied in the `contentFromResourceDependency` field of the record.
309-
- `FROM_DYNAMIC_DEPENDENCY/resource.properties`: this resource exists only in `org.talend.sdk.samplefeature.dynamicdependencies:service-provider-from-dynamic-dependency` module. The resource value is copied in the `contentFromResourceDynamicDependency` field of the record.
310-
- `FROM_EXTERNAL_DEPENDENCY/resource.properties`: this resource exists only in `org.talend.sdk.samplefeature.dynamicdependencies:service-provider-from-external-dependency` module. The resource value is copied in the `contentFromResourceExternalDependency` field of the record.
308+
- `FROM_DEPENDENCY/resource.properties`: this resource exists only in `org.talend.sdk.component.loading-analysis:service-provider-from-dependency` module. The resource value is copied in the `contentFromResourceDependency` field of the record.
309+
- `FROM_DYNAMIC_DEPENDENCY/resource.properties`: this resource exists only in `org.talend.sdk.component.loading-analysis:service-provider-from-dynamic-dependency` module. The resource value is copied in the `contentFromResourceDynamicDependency` field of the record.
310+
- `FROM_EXTERNAL_DEPENDENCY/resource.properties`: this resource exists only in `org.talend.sdk.component.loading-analysis:service-provider-from-external-dependency` module. The resource value is copied in the `contentFromResourceExternalDependency` field of the record.
311311

312312
All those three resources are successfully loaded in this example.
313313

314314
The last field, `contentFromMultipleResources` contain the result of loading multiple resources at once using `DynamicDependenciesWithSPIService.class.getClassLoader().getResources(resource)` for the resource path `FROM_MULTIPLE/resource.txt`.
315-
This resource exists in all the three modules `org.talend.sdk.samplefeature.dynamicdependencies:service-provider-from-dependency`, `org.talend.sdk.samplefeature.dynamicdependencies:service-provider-from-dynamic-dependency`, `org.talend.sdk.samplefeature.dynamicdependencies:service-provider-from-external-dependency`.
315+
This resource exists in all the three modules `org.talend.sdk.component.loading-analysis:service-provider-from-dependency`, `org.talend.sdk.component.loading-analysis:service-provider-from-dynamic-dependency`, `org.talend.sdk.component.loading-analysis:service-provider-from-external-dependency`.
316316
So, 3 values should be concatenated in this field if everything were loaded. In the example, the content of this resource is successfully loaded from static and dynamic dependencies, but twice for each! And, the `FROM_MULTIPLE/resource.txt`
317-
in `org.talend.sdk.samplefeature.dynamicdependencies:service-provider-from-external-dependency` is not found.
317+
in `org.talend.sdk.component.loading-analysis:service-provider-from-external-dependency` is not found.

0 commit comments

Comments
 (0)