Spring | JMS Listener via JmsListener annotation
Spring framework provides annotation based configuration for dependency injection. Normally, MessageListener interface needs to be implemented in Queue/Topic receiver class for incoming messages. The overridden onMessage method in that class handle the incoming message. Spring provides below annotations to enable jms communication. @JmsListener annotation can mark any method to handle message. @EnableJms annotation to detect and register @JmsListener methods for jms messages. Below is class to handle jms message. @JmsListener requires default jms container factory configuration. Add below lines in bean conf file for this. Please refer this post for conf file. Deploy war file to JBoss server and send sample message from Gems tool.