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
Copy file name to clipboardExpand all lines: src/reference/asciidoc/gateway.adoc
-1
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,6 @@ It lets you configure an interface as a service, as the following example shows:
45
45
====
46
46
47
47
With this configuration defined, the `cafeService` can now be injected into other beans, and the code that invokes the methods on that proxied instance of the `Cafe` interface has no awareness of the Spring Integration API.
48
-
The general approach is similar to that of Spring Remoting (RMI, HttpInvoker, and so on).
49
48
See the <<./samples.adoc#samples,"`Samples`">> Appendix for an example that uses the `gateway` element (in the Cafe demo).
50
49
51
50
The defaults in the preceding configuration are applied to all methods on the gateway interface.
Copy file name to clipboardExpand all lines: src/reference/asciidoc/handler-advice.adoc
+9-10
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ The schema does not allow a `<request-handler-advice-chain>` as a child element
41
41
42
42
However, a `<request-handler-advice-chain>` can be added to individual reply-producing endpoints within a `<chain>` element.
43
43
An exception is that, in a chain that produces no reply, because the last element in the chain is an `outbound-channel-adapter`, that last element cannot be advised.
44
-
If you need to advise such an element, it must be moved outside of the chain (with the `output-channel` of the chain being the `input-channel` of the adapter).
44
+
If you need to advise such an element, it must be moved outside the chain (with the `output-channel` of the chain being the `input-channel` of the adapter).
45
45
The adapter can then be advised as usual.
46
46
For chains that produce a reply, every child element can be advised.
47
47
=====
@@ -247,7 +247,7 @@ A `<handler-retry-advice>` with no child element uses no back off.
247
247
If there is no `recovery-channel`, the exception is thrown when retries are exhausted.
248
248
The namespace can only be used with stateless retry.
249
249
+
250
-
For more complex environments (custom policies etc), use normal `<bean>` definitions.
250
+
For more complex environments (custom policies etc.), use normal `<bean>` definitions.
251
251
252
252
Simple Stateful Retry with Recovery::
253
253
To make retry stateful, we need to provide the advice with a `RetryStateGenerator` implementation.
@@ -324,7 +324,7 @@ The default configuration retries for all exceptions and the exception classifie
324
324
If you configure it to, say, retry only on `MyException` and your application throws a `SomeOtherException` where the cause is a `MyException`, retry does not occur.
325
325
+
326
326
Since Spring Retry 1.0.3, the `BinaryExceptionClassifier` has a property called `traverseCauses` (the default is `false`).
327
-
When `true`, it traverses exception causes until it finds a match or runs out of causes to traverse.
327
+
When `true`, it traverses exception causes until it finds a match or runs out of causes traversing.
328
328
+
329
329
To use this classifier for retry, use a `SimpleRetryPolicy` created with the constructor that takes the max attempts, the `Map` of `Exception` objects, and the `traverseCauses` boolean.
330
330
Then you can inject this policy into the `RetryTemplate`.
@@ -692,17 +692,16 @@ For example, a `RetryOperationsInterceptor` could be applied to the whole sub-fl
692
692
==== Transaction Support
693
693
694
694
Starting with version 5.0, a new `TransactionHandleMessageAdvice` has been introduced to make the whole downstream flow transactional, thanks to the `HandleMessageAdvice` implementation.
695
-
When a regular `TransactionInterceptor` is used in the `<request-handler-advice-chain>` element (for example, through configuring `<tx:advice>`), a started transaction is only applied only for an internal `AbstractReplyProducingMessageHandler.handleRequestMessage()` and is not propagated to the downstream flow.
695
+
When a regular `TransactionInterceptor` is used in the `<request-handler-advice-chain>` element (for example, through configuring `<tx:advice>`), a started transaction is applied only for an internal `AbstractReplyProducingMessageHandler.handleRequestMessage()` and is not propagated to the downstream flow.
696
696
697
697
To simplify XML configuration, along with the `<request-handler-advice-chain>`, a `<transactional>` element has been added to all `<outbound-gateway>` and `<service-activator>` and related components.
698
698
The following example shows `<transactional>` in use:
@@ -798,14 +797,14 @@ public class MyAdvisedFilter {
798
797
----
799
798
800
799
[[advice-order]]
801
-
==== Ordering Advices within an Advice Chain
800
+
==== Ordering Advices within Advice Chain
802
801
803
802
Advice classes are "`around`" advices and are applied in a nested fashion.
804
803
The first advice is the outermost, while the last advice is the innermost (that is, closest to the handler being advised).
805
804
It is important to put the advice classes in the correct order to achieve the functionality you desire.
806
805
807
806
For example, suppose you want to add a retry advice and a transaction advice.
808
-
You may want to place the retry advice advice first, followed by the transaction advice.
807
+
You may want to place the retry advice first, followed by the transaction advice.
809
808
Consequently, each retry is performed in a new transaction.
810
809
On the other hand, if you want all the attempts and any recovery operations (in the retry `RecoveryCallback`) to be scoped within the transaction, you could put the transaction advice first.
0 commit comments