Spring实现IBMMQ的JMS消息发布/订阅模式
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd">
<!-- IBM的mq配置 ConnectionFactory-->
<bean id="mqConnectionFactoryTarget" />
</property>
<property name="queueManager" value="${ibm_queueManager}" />
<property name="hostName" value="${ibm_hostName}" />
<property name="port" value="${ibm_port}" />
</bean>
<bean id="mqConnectionFactory"
ref="mqConnectionFactoryTarget" />
<property name="username" value=" " />
<property name="password" value=" " />
</bean>
<bean id="jmsTemplate" ref="mqConnectionFactory" />
</bean>
<!-- Topic定义 -->
<bean id="notifyTopic" />
</bean>
</beans>
<!-- 异步接收Topic消息Container
<property name="connectionFactory" ref="jmsFactory" />-->
<bean id="jmsContainer" lazy-init="false">
<property name="connectionFactory" ref="mqConnectionFactory" />
<property name="destination" ref="notifyTopic" />
<property name="messageListener" ref="notifyTopicListener" />
</bean>
<!-- 异步接收Topic消息处理类 -->
<bean id="notifyTopicListener" />