spring jms 配置
<?xml version="1.0" encoding="UTF-8"?>
<beansxmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<!-- 配置connectionFactory -->
<bean id="jmsFactory"
/>
</property>
<property name="defaultDestinationName" value="subject" />
<property name="messageConverter" ref="conversion" />
<!-- 区别它采用的模式为false是p2p为true是订阅 -->
<property name="pubSubDomain" value="false" />
</bean>
<!-- 读取信息 -->
<bean id="consumer3" ref="myJmsTemplate" />
</bean>
<!-- 发送信息 -->
<bean id="producer" ref="myJmsTemplate" />
<!-- <property name="destination" ref="destination"/>-->
<!-- <property name="destinationName" value="subject"/> -->
</bean>
<!-- 消息监听 -->
<bean id="listenerContainer3"
value="5" />
<property name="connectionFactory" ref="jmsFactory" />
<property name="destinationName" value="subject" />
<property name="messageListener" ref="consumer3" />
</bean>
<!-- 消息转换 -->
<bean id="conversion"
/>
<!-- POJO类 -->
<bean id="hello" />
</beans>