You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This flexibility allows DefaultTargetSystem to inject any dependencies needed for non-transactional systems, while specialized target systems provide convenience methods for their common dependencies.
64
+
This flexibility allows NonTransactionalTargetSystem to inject any dependencies needed for non-transactional systems, while specialized target systems provide convenience methods for their common dependencies.
The constructor requires the target system name, Couchbase cluster, and bucket. Optional configurations can be added via `.withXXX()` methods.
50
50
51
+
:::info Register Target System
52
+
Once created, you need to register this target system with Flamingock. See [Registering target systems](introduction.md#registering-target-systems) for details.
53
+
:::
54
+
51
55
## Target System Configuration
52
56
53
57
The Couchbase target system uses Flamingock's [split dependency resolution architecture](introduction.md#dependency-injection) with separate flows for target system configuration and change execution dependencies.
@@ -61,11 +65,11 @@ These dependencies must be provided at target system creation time with **no glo
61
65
|`Cluster`|`cluster`| Couchbase cluster connection - **required** for both target system configuration and change execution |
62
66
|`Bucket`|`bucket`| Target bucket instance - **required** for both target system configuration and change execution |
63
67
64
-
###Dependencies Available to Changes
68
+
## Dependencies Available to Changes
65
69
66
70
Changes can access dependencies through [dependency injection with fallback](../changes/anatomy-and-structure.md#method-parameters-and-dependency-injection):
67
71
68
-
1.**Target system context** (highest priority) - `Cluster`, `Bucket`, `AttemptContext`, plus any added via `.addDependency()`
72
+
1.**Target system context** (highest priority) - `Cluster`, `Bucket`, `TransactionAttemptContext`, plus any added via `.addDependency()`
69
73
2.**Target system additional dependencies** - added via `.addDependency()` or `.setProperty()`
70
74
3.**Global context** (fallback) - shared dependencies available to all target systems
71
75
@@ -93,7 +97,7 @@ Flamingock.builder()
93
97
**Change dependency resolution for Changes in "user-database":**
94
98
-**Cluster**: From target system context (`productionCluster`)
95
99
-**Bucket**: From target system context (`userBucket`)
96
-
-**AttemptContext**: From target system context (created by Flamingock)
100
+
-**TransactionAttemptContext**: From target system context (created by Flamingock)
97
101
-**AuditService**: From target system additional dependencies
98
102
-**EmailService**: From global context (fallback)
99
103
-**LogService**: From global context (fallback)
@@ -102,18 +106,18 @@ This architecture ensures explicit target system configuration while providing f
102
106
103
107
## Transactional support
104
108
105
-
For a Change to leverage Couchbase's transactional capabilities, it must use the `AttemptContext` parameter. Flamingock uses the injected `Cluster` and `Bucket` dependencies to create and manage this context's lifecycle - creating the transaction context before execution, committing on success, and rolling back on failure.
109
+
For a Change to leverage Couchbase's transactional capabilities, it must use the `TransactionAttemptContext` parameter. Flamingock uses the injected `Cluster` and `Bucket` dependencies to create and manage this context's lifecycle - creating the transaction context before execution, committing on success, and rolling back on failure.
106
110
107
111
> For detailed information on transaction handling, see [Transactions](../changes/transactions.md).
@@ -149,15 +153,15 @@ public class UpdateConfigs {
149
153
```
150
154
151
155
**How transactions work:**
152
-
1.**Context creation**: Flamingock uses the target system's `Cluster` to create an `AttemptContext` for transaction management
156
+
1.**Context creation**: Flamingock uses the target system's `Cluster` to create an `TransactionAttemptContext` for transaction management
153
157
2.**Transaction management**: The same `Cluster` and `Bucket` handle transaction operations and coordinate with the context
154
158
3.**Lifecycle**: Flamingock automatically creates the transaction context, commits on success, or rolls back on failure
155
159
156
-
Without the `AttemptContext` parameter, operations will execute but won't participate in transactions.
160
+
Without the `TransactionAttemptContext` parameter, operations will execute but won't participate in transactions.
157
161
158
162
## Available dependencies in Changes
159
163
160
-
Your Changes can inject Couchbase-specific dependencies like `Cluster`, `Bucket`, and `AttemptContext` (for transactions), but are not limited to these. The target system provides these dependencies through its context, and you can add additional dependencies via `.addDependency()` that take precedence over global dependencies.
164
+
Your Changes can inject Couchbase-specific dependencies like `Cluster`, `Bucket`, and `TransactionAttemptContext` (for transactions), but are not limited to these. The target system provides these dependencies through its context, and you can add additional dependencies via `.addDependency()` that take precedence over global dependencies.
161
165
162
166
For comprehensive details on change dependency resolution, see [Change Anatomy & Structure](../changes/anatomy-and-structure.md).
The constructor requires the target system name and DynamoDB client. Optional configurations can be added via `.withXXX()` methods.
50
50
51
+
:::info Register Target System
52
+
Once created, you need to register this target system with Flamingock. See [Registering target systems](introduction.md#registering-target-systems) for details.
53
+
:::
54
+
51
55
## Target System Configuration
52
56
53
57
The DynamoDB target system uses Flamingock's [split dependency resolution architecture](introduction.md#dependency-injection) with separate flows for target system configuration and change execution dependencies.
@@ -60,7 +64,7 @@ These dependencies must be provided at target system creation time with **no glo
|`DynamoDbClient`|`dynamoDbClient`| AWS DynamoDB client - **required** for both target system configuration and change execution |
62
66
63
-
###Dependencies Available to Changes
67
+
## Dependencies Available to Changes
64
68
65
69
Changes can access dependencies through [dependency injection with fallback](../changes/anatomy-and-structure.md#method-parameters-and-dependency-injection):
66
70
@@ -104,7 +108,7 @@ For a Change to leverage DynamoDB's transactional capabilities, it must use the
104
108
> For detailed information on transaction handling, see [Transactions](../changes/transactions.md).
**No global context fallback** - target system configuration must be explicit and complete.
65
68
66
69
67
-
## Dependency injection
68
-
69
-
Dependency injection is the mechanism used for **change execution**, providing the dependencies that Changes need to perform their operations. Each target system exposes specific dependencies required by its Changes:
70
-
71
-
- A MongoDB target system provides a `MongoDatabase`, `ClientSession`
72
-
- A Kafka target system provides a `KafkaTemplate`
73
-
- A SQL target system provides a `Connection` or `DataSource`
74
-
75
-
Flamingock uses a **flexible, multi-source approach** with fallback hierarchy for change execution:
76
-
77
-
1.**Target system context** (highest priority) - includes configuration parameters from constructor + `.withXXX()` methods
78
-
2.**Target system additional dependencies** - added via `.addDependency()` or `.setProperty()`
79
-
3.**Global context** (fallback) - shared dependencies available to all target systems
80
-
81
-
:::info
82
-
Target system configuration parameters (from **constructor** and `.withXXX()` methods) are automatically available as change dependencies with highest priority.
83
-
:::
84
-
85
-
For comprehensive details on change dependency resolution, see [Change Anatomy & Structure](../changes/anatomy-and-structure.md).
70
+
## Registering target systems
86
71
72
+
Target systems are registered at runtime. You can define and register as many as you need:
@@ -148,6 +138,27 @@ public class _001_AddCategory {
148
138
149
139
150
140
141
+
## Dependency injection
142
+
143
+
Dependency injection is the mechanism used for **change execution**, providing the dependencies that Changes need to perform their operations. Each target system exposes specific dependencies required by its Changes:
144
+
145
+
- A MongoDB target system provides a `MongoDatabase`, `ClientSession`
146
+
- A Kafka target system provides a `KafkaTemplate`
147
+
- A SQL target system provides a `Connection` or `DataSource`
148
+
149
+
Flamingock uses a **flexible, multi-source approach** with fallback hierarchy for change execution:
150
+
151
+
1.**Target system context** (highest priority) - includes configuration parameters from constructor + `.withXXX()` methods
152
+
2.**Target system additional dependencies** - added via `.addDependency()` or `.setProperty()`
153
+
3.**Global context** (fallback) - shared dependencies available to all target systems
154
+
155
+
:::info
156
+
Target system configuration parameters (from **constructor** and `.withXXX()` methods) are automatically available as change dependencies with highest priority.
157
+
:::
158
+
159
+
For comprehensive details on change dependency resolution, see [Change Anatomy & Structure](../changes/anatomy-and-structure.md).
160
+
161
+
151
162
## Cloud Edition visibility
152
163
153
164
In the Cloud Edition, target systems become a first-class part of the dashboard:
@@ -184,7 +195,7 @@ These target systems provide optimized handling for specific technologies:
184
195
### Universal fallback
185
196
For any system that doesn't require specialized handling:
186
197
187
-
-[Default target system](../target-systems/default-target-system.md) - The fallback choice for any system without a dedicated implementation (Kafka Schema Registry, S3, REST APIs, file systems, etc.)
198
+
-[Non-transactional target system](../target-systems/non-transactional-target-system.md) - The fallback choice for any system without a dedicated implementation (Kafka Schema Registry, S3, REST APIs, file systems, etc.)
188
199
189
200
**Future extensibility**: The Flamingock ecosystem may expand with more specialized target systems as specific needs are identified. These can be implemented by the Flamingock team, community contributions, or custom implementations by users.
0 commit comments