This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 8e16809 CAMEL-17585: Removed deprecated option on Saga EIP
8e16809 is described below
commit 8e16809a7e5e1361b572d29962983b517e53b5c1
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed Feb 2 09:14:01 2022 +0100
CAMEL-17585: Removed deprecated option on Saga EIP
---
.../resources/org/apache/camel/model/saga.json | 1 -
.../java/org/apache/camel/model/SagaDefinition.java | 17 -----------------
.../main/java/org/apache/camel/reifier/SagaReifier.java | 2 +-
.../java/org/apache/camel/xml/in/ModelParser.java | 1 -
4 files changed, 1 insertion(+), 20 deletions(-)
diff --git
a/core/camel-core-model/src/generated/resources/org/apache/camel/model/saga.json
b/core/camel-core-model/src/generated/resources/org/apache/camel/model/saga.json
index 5ca9d27..0da4305 100644
---
a/core/camel-core-model/src/generated/resources/org/apache/camel/model/saga.json
+++
b/core/camel-core-model/src/generated/resources/org/apache/camel/model/saga.json
@@ -14,7 +14,6 @@
"properties": {
"propagation": { "kind": "attribute", "displayName": "Propagation",
"required": false, "type": "enum", "javaType":
"org.apache.camel.model.SagaPropagation", "enum": [ "REQUIRED", "REQUIRES_NEW",
"MANDATORY", "SUPPORTS", "NOT_SUPPORTED", "NEVER" ], "deprecated": false,
"autowired": false, "secret": false, "defaultValue": "REQUIRED", "description":
"Set the Saga propagation mode (REQUIRED, REQUIRES_NEW, MANDATORY, SUPPORTS,
NOT_SUPPORTED, NEVER)." },
"completionMode": { "kind": "attribute", "displayName": "Completion Mode",
"required": false, "type": "enum", "javaType":
"org.apache.camel.model.SagaCompletionMode", "enum": [ "AUTO", "MANUAL" ],
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
"AUTO", "description": "Determine how the saga should be considered complete.
When set to AUTO, the saga is completed when the exchange that initiates the
saga is processed successfully, or compensated when it complet [...]
- "timeoutInMilliseconds": { "kind": "attribute", "displayName": "Timeout In
Milliseconds", "required": false, "type": "integer", "javaType":
"java.lang.Long", "deprecated": true, "deprecationNote": "Use timeout instead",
"autowired": false, "secret": false, "description": "Set the maximum amount of
time for the Saga. After the timeout is expired, the saga will be compensated
automatically (unless a different decision has been taken in the meantime)." },
"timeout": { "kind": "attribute", "displayName": "Timeout", "required":
false, "type": "duration", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "Set the maximum amount of
time for the Saga. After the timeout is expired, the saga will be compensated
automatically (unless a different decision has been taken in the meantime)." },
"compensation": { "kind": "element", "displayName": "Compensation",
"required": false, "type": "object", "javaType":
"org.apache.camel.model.SagaActionUriDefinition", "deprecated": false,
"autowired": false, "secret": false, "description": "The compensation endpoint
URI that must be called to compensate all changes done in the route. The route
corresponding to the compensation URI must perform compensation and complete
without error. If errors occur during compensation, the saga serv [...]
"completion": { "kind": "element", "displayName": "Completion",
"required": false, "type": "object", "javaType":
"org.apache.camel.model.SagaActionUriDefinition", "deprecated": false,
"autowired": false, "secret": false, "description": "The completion endpoint
URI that will be called when the Saga is completed successfully. The route
corresponding to the completion URI must perform completion tasks and terminate
without error. If errors occur during completion, the saga service may c [...]
diff --git
a/core/camel-core-model/src/main/java/org/apache/camel/model/SagaDefinition.java
b/core/camel-core-model/src/main/java/org/apache/camel/model/SagaDefinition.java
index b66d5c0..3568c71 100644
---
a/core/camel-core-model/src/main/java/org/apache/camel/model/SagaDefinition.java
+++
b/core/camel-core-model/src/main/java/org/apache/camel/model/SagaDefinition.java
@@ -53,11 +53,6 @@ public class SagaDefinition extends
OutputDefinition<SagaDefinition> {
private String completionMode;
@XmlAttribute
- @Metadata(javaType = "java.lang.Long", deprecationNote = "Use timeout
instead")
- @Deprecated
- private String timeoutInMilliseconds;
-
- @XmlAttribute
@Metadata(javaType = "java.time.Duration")
private String timeout;
@@ -216,18 +211,6 @@ public class SagaDefinition extends
OutputDefinition<SagaDefinition> {
this.timeout = timeout;
}
- public String getTimeoutInMilliseconds() {
- return timeoutInMilliseconds;
- }
-
- /**
- * Set the maximum amount of time for the Saga. After the timeout is
expired, the saga will be compensated
- * automatically (unless a different decision has been taken in the
meantime).
- */
- public void setTimeoutInMilliseconds(String timeoutInMilliseconds) {
- this.timeoutInMilliseconds = timeoutInMilliseconds;
- }
-
private void addOption(String option, Expression expression) {
if (this.options == null) {
this.options = new ArrayList<>();
diff --git
a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/SagaReifier.java
b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/SagaReifier.java
index 447adae..c7025e8 100644
---
a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/SagaReifier.java
+++
b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/SagaReifier.java
@@ -60,7 +60,7 @@ public class SagaReifier extends
ProcessorReifier<SagaDefinition> {
}
}
- String timeout = definition.getTimeout() != null ?
definition.getTimeout() : definition.getTimeoutInMilliseconds();
+ String timeout = definition.getTimeout();
CamelSagaStep step = new CamelSagaStep(
compensationEndpoint, completionEndpoint, optionsMap,
Optional.ofNullable(parseDuration(timeout)));
diff --git
a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
index 04db450..34ffeb1 100644
---
a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
+++
b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
@@ -1240,7 +1240,6 @@ public class ModelParser extends BaseParser {
case "propagation": def.setPropagation(val); break;
case "sagaServiceRef": def.setSagaServiceRef(val); break;
case "timeout": def.setTimeout(val); break;
- case "timeoutInMilliseconds":
def.setTimeoutInMilliseconds(val); break;
default: return
processorDefinitionAttributeHandler().accept(def, key, val);
}
return true;