读书人

spring activeMQ配备

发布时间: 2012-10-28 09:54:44 作者: rapoo

spring activeMQ配置

<beans  xmlns="http://www.springframework.org/schema/beans"  xmlns:amq="http://activemq.org/config/1.0"  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.org/config/1.0 http://activemq.apache.org/schema/activemq-core.xsd  http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">    <!--  lets create an embedded ActiveMQ Broker -->  <amq:broker useJmx="false" persistent="false">    <amq:transportConnectors>      <amq:transportConnector uri="tcp://localhost:0" />    </amq:transportConnectors>  </amq:broker>   <!--  ActiveMQ destinations to use  -->  <amq:queue id="destination"  physicalName="org.apache.activemq.spring.Test.spring.embedded"/>  <!-- JMS ConnectionFactory to use, configuring the embedded broker using XML -->  <amq:connectionFactory id="jmsFactory" brokerURL="vm://localhost"/>    <!-- Spring JMS Template -->  <bean id="myJmsTemplate" />        </property>      </bean>    </property>  </bean>  <bean id="consumerJmsTemplate" ref="jmsFactory"/>  </bean></beans>

?

读书人网 >编程

热点推荐