Spring整合ActiveMQ

 官方相關知識點文檔:http://activemq.apache.org/spring-support.html

 Jar Maven 搜索地址:http://search.maven.org/

 環境

  spring 2.5.6

  ActiveMQ 5.7

 額外Jar

   (根據名稱在Maven搜索裏可以查詢到所有版本的Jar,可下載,也可查詢到POM格式)

   activemq-spring

   xbean-spring 

 配置文件

(放在Spring配置文件中即可,也可單獨XML文件存放)

<beans xmlns="http://www.springframework.org/schema/beans"

xmlns:amq="http://activemq.apache.org/schema/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd

  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">

<amq:broker useJmx="false" persistent="false">

<amq:transportConnectors>

<amq:transportConnector uri="tcp://localhost:61616" />

</amq:transportConnectors>

</amq:broker>

</beans>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章