Add support for repeatable JmsListener

Previously, a method could only declare one Jms endpoint so if several
destinations share the exact same business logic, you'd still need one
separate method declaration per destination.

We now make sure that JmsListener is a repeatable annotation, introducing
JmsListeners for pre Java8 use cases.

Issue: SPR-13147
This commit is contained in:
Stephane Nicoll
2015-06-22 11:39:52 +02:00
parent 9ada55dc6b
commit 4631add6cf
10 changed files with 180 additions and 10 deletions

View File

@@ -2577,6 +2577,10 @@ provides).
The annotated endpoint infrastructure creates a message listener container
behind the scenes for each annotated method, using a `JmsListenerContainerFactory`.
TIP: `@JmsListener` is a _repeatable_ annotation so it is possible to associate several
JMS destinations to the same method by adding additional `@JmsListener` declaration on
it. For pre Java8 use cases, you can use `@JmsListeners`.
[[jms-annotated-support]]
==== Enable listener endpoint annotations