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

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jms="http://www.springframework.org/schema/jms"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/jms
http://www.springframework.org/schema/jms/spring-jms-4.1.xsd">
<jms:annotation-driven/>
<bean class="org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests$JmsListenerRepeatableBean"/>
<bean id="jmsListenerContainerFactory"
class="org.springframework.jms.config.JmsListenerContainerTestFactory"/>
</beans>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jms="http://www.springframework.org/schema/jms"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/jms
http://www.springframework.org/schema/jms/spring-jms-4.1.xsd">
<jms:annotation-driven/>
<bean class="org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests$JmsListenersBean"/>
<bean id="jmsListenerContainerFactory"
class="org.springframework.jms.config.JmsListenerContainerTestFactory"/>
</beans>