Java Reference
In-Depth Information
<bean id="mailListener"
class="com.apress.springenterpriserecipes.post.MailListener" />
<jms:listener-container
connection-factory="connectionFactory"
transaction-manager="transactionManager"
message-converter="mailMessageConverter">
<jms:listener
destination="mail.queue"
ref="mailListener" method="displayMail" />
</jms:listener-container>
</beans>
Actually, you don't need to specify the connection-factory attribute for a listener container
explicitly if your JMS connection factory's name is connectionFactory , which can be located by default.
Summary
This chapter explored Spring's support for JMS: how JMS fits in an architecture and how to use Spring to
build message-oriented architectures. You learned how to both produce and consume messages using a
message queue. You worked with Active MQ, a reliable open source message queue. Finally, you learned
how to build message-driven POJOs.
The next chapter will explore Spring integration, which is an ESB-like framework for building
application integration solutions, similar to Mule ESB and ServiceMix. You will be able to leverage the
knowledge gained in this chapter to take your message-oriented applications to new heights with Spring
integration.
 
Search WWH ::




Custom Search