By default, Spring use the DynamicDestinationResolver
for the listener container so it expects to receive a bean reference in the destination attribute of the listener. Since you are using a JNDI
name, you should set the destination resolver strategy to jndiDestinationResolver
.
<jms:listener-container destination-resolver="jndiDestinationResolver" destination-type="queue" acknowledge="auto" connection-factory="jmsConnectionFactory">
<jms:listener destination="java:jboss/exported/jms/queue/myQueue" ref="myHandler" method="processMessage" />
</jms:listener-container>
Replacing the destination attribute value with the bean reference should also do the trick :
<jms:listener-container destination-type="queue" acknowledge="auto" connection-factory="jmsConnectionFactory">
<jms:listener destination="myQueue" ref="myHandler" method="processMessage" />
</jms:listener-container>