@@ -43045,7 +43045,7 @@ the receiver should wait before giving up waiting for a message.
43045
43045
[NOTE]
43046
43046
====
43047
43047
Spring also supports annotated-listener endpoints through the use of the `@JmsListener`
43048
- and provides an open infrastructure to register endpoints programmatically. This
43048
+ annotation and provides an open infrastructure to register endpoints programmatically. This
43049
43049
is by far the most convenient way to setup an asynchronous receiver, see
43050
43050
<<jms-annotated-support>> for more details.
43051
43051
====
@@ -43582,7 +43582,7 @@ These are the main elements you can inject in JMS listener endpoints:
43582
43582
* A non-annotated element that is not one of the supported types (i.e. `Message` and
43583
43583
`Session`) is considered to be the payload. You can make that explicit by annotating
43584
43584
the parameter with `@Payload`. You can also turn on validation by adding an extra
43585
- `@Validated `.
43585
+ `@Valid `.
43586
43586
43587
43587
The ability to inject Spring's `Message` abstraction is particularly useful to benefit
43588
43588
from all the information stored in the transport-specific message without relying on
@@ -43595,7 +43595,7 @@ transport-specific API.
43595
43595
public void processOrder(Message<Order> order) { ... }
43596
43596
----
43597
43597
43598
- Handling of method arguments is provided by `DefaultJmsHandlerMethodFactory ` which can be
43598
+ Handling of method arguments is provided by `DefaultMessageHandlerMethodFactory ` which can be
43599
43599
further customized to support additional method arguments. The conversion and validation
43600
43600
support can be customized there as well.
43601
43601
@@ -43611,12 +43611,12 @@ annotate the payload with `@Valid` and configure the necessary validator as foll
43611
43611
43612
43612
@Override
43613
43613
public void configureJmsListeners(JmsListenerEndpointRegistrar registrar) {
43614
- registrar.setJmsHandlerMethodFactory (myJmsHandlerMethodFactory());
43614
+ registrar.setMessageHandlerMethodFactory (myJmsHandlerMethodFactory());
43615
43615
}
43616
43616
43617
43617
@Bean
43618
- public DefaultJmsHandlerMethodFactory myJmsHandlerMethodFactory () {
43619
- DefaultJmsHandlerMethodFactory factory = new DefaultJmsHandlerMethodFactory ();
43618
+ public DefaultMessageHandlerMethodFactory myHandlerMethodFactory () {
43619
+ DefaultMessageHandlerMethodFactory factory = new DefaultMessageHandlerMethodFactory ();
43620
43620
factory.setValidator(myValidator());
43621
43621
return factory;
43622
43622
}
0 commit comments