We need the ability to cache the MQ Connection, because each time it is taking like 450 ms to get the Connection since the MQ server is in London and the code that is trying to get the connection is in Stamford. Please suggest.
The FillRouter sends the message to the MQ Queue and it is taking 450ms to get the Connection.Code:2010-06-08 15:04:24,700 INFO [fat.fillsQueueContainer-1] fatprocessor.FillRouter - Time inside Router:0, 2010-06-08 15:04:24 2010-06-08 15:04:25,156 INFO [pool-2-thread-1] jms.FatTransferObjectMessageConverter - fat-processor:toMessage OrderID:US172316
I need the ability to add something likeCode:<bean id="fat.fillRouter" class="com.xx.FillRouter"> <constructor-arg value="fat.toSke"/> ... </bean> <jms:outbound-channel-adapter id="fat.requestTopicSender" channel="fat.toSke" jms-template="fat.outboundRequestTopicJmsTemplate"/> <bean id="fat.outboundSkeJmsTemplate" parent="common-ibmmq.queueJmsTemplate" > <property name="messageConverter" ref="fat.skeMessageConverter"/> <property name="defaultDestination" ref="common.fatSendQueue"/> </bean> <bean id="common-ibmmq.queueConnectionFactory" class="com.ibm.mq.jms.MQConnectionFactory" lazy-init="true"> <property name="queueManager" value="${mq.conn.fac.name.mgr}" /> <property name="hostName" value="${mq.conn.fac.host}" /> <property name="port" value="${mq.conn.fac.port}" /> <property name="channel" value="${mq.conn.fac.channel}" /> <property name="transportType" value="1" /> </bean> <bean id="common-ibmmq.baseJmsTemplate" abstract="true" class="org.springframework.jms.core.JmsTemplate" /> <bean id="common-ibmmq.queueJmsTemplate" parent="common-ibmmq.baseJmsTemplate" lazy-init="true"> <property name="connectionFactory" ref="common-ibmmq.queueConnectionFactory" /> </bean>
<property name="cacheLevelName" value="CACHE_CONNECTION"></property>
But, this property can be added only to DefaultMessageListenerContainer not the template. How can I achieve this? Please suggest.


Reply With Quote
