Spring Integration with IBM MQ Series -
am novice when comes spring integration , had questions around it. trying integrate spring integration mq series , believe ibm mq(q connection factory , queue) entries should going inside applicationcontext.xml file. have applicationcontext file activemq implementation , wanted know ibm mq specific entries in app contest file like. questions -
- do need have mq series installed on same machine running spring application.
- i presume not, should entries queueconnectionfactory , destination attributes in applicationcontext file. providing sample poc's me lot.
thanks in advance.
you can create beans this
jms.transporttype=1 jms.queuemanager=your_queue_manager jms.hostname=your_hostname jms.port=1321 jms.channel=your_channel jms.receiver.queue.name=your_queue jms.username= jms.alias= jms.mq.connection.factory=jmsconnectionfactory jms.mq.receiver.queue=receiverqueue
<bean id="jmsconnectionfactory" class="com.ibm.mq.jms.mqqueueconnectionfactory"> <property name="transporttype" value="${jms.transporttype}"/> <property name="queuemanager" value="${jms.queuemanager}"/> <property name="hostname" value="${jms.hostname}"/> <property name="port" value="${jms.port}" /> <property name="channel" value="${jms.channel}"/> </bean> <bean id="securejmsconnectionadapter" class="yourpackages.securejmsconnectionadapter"> <property name="targetconnectionfactory" ref="${jms.mq.connection.factory}" /> <property name="username" value="${jms.username}"/> <property name="pwdalias" value="${jms.alias}"/> </bean> <bean id="receiverqueue" class="com.ibm.mq.jms.mqqueue"> <constructor-arg index="0" value="${jms.queuemanager}"/> <constructor-arg index="1" value="${jms.receiver.queue.name}"/> </bean> <bean id="receiverjmstemplate" class="org.springframework.jms.core.jmstemplate"> <property name="connectionfactory" ref="securejmsconnectionadapter" /> <property name="pubsubdomain" value="false"/> <property name="defaultdestination" ref="${jms.mq.receiver.queue}"/> <property name="receivetimeout" value="30000"/> </bean> <bean class="org.springframework.jms.listener.simplemessagelistenercontainer"> <property name="connectionfactory" ref="securejmsconnectionadapter" /> <property name="destinationname" value="${jms.receiver.queue.name}" /> <property name="messagelistener" ref="mqlistener" /> </bean>
Comments
Post a Comment