we are using spring integration in our project were we connect the channels with Jms message queues on weblogic after lookup through jndi.
we have a request and response simple channel configured which connects to one request and one response channel using jms-target and jms-source respectively.
hereforth is something similar to the xml code that we use.
but once the weblogic server or the jndi provider is unavailable the channels try to connect to the queues repeatedly and i have an out of memory error.Code:<message-bus/> <annotation-driven/> <beans:bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate"> <beans:property name="environment"> <beans:props> <beans:prop key="java.naming.factory.initial"> weblogic.jndi.WLInitialContextFactory </beans:prop> <beans:prop key="java.naming.provider.url"> t3://localhost:7001 </beans:prop> </beans:props> </beans:property> </beans:bean> <beans:bean id="connectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean"> <beans:property name="jndiTemplate"> <beans:ref bean="jndiTemplate" /> </beans:property> <beans:property name="jndiName"> <beans:value>jank.jms.QueueConnectionFactory</beans:value> </beans:property> </beans:bean> <beans:bean id="internalJobRequestQueue" class="org.springframework.jndi.JndiObjectFactoryBean"> <beans:property name="jndiTemplate"> <beans:ref bean="jndiTemplate" /> </beans:property> <beans:property name="jndiName"> <beans:value>jank.jms.queue.request<beans:value> </beans:property> </beans:bean> <beans:bean id="internalJobResponseQueue" class="org.springframework.jndi.JndiObjectFactoryBean"> <beans:property name="jndiTemplate"> <beans:ref bean="jndiTemplate" /> </beans:property> <beans:property name="jndiName"> <beans:value>jank.jms.queue.response<beans:value> </beans:property> </beans:bean> <jms-target id="request" connection-factory="connectionFactory" destination="internalJobRequestQueue" channel="externalJobRequestChannel"/> <jms-source id="response" message-converter="internalMessageConverter" connection-factory="connectionFactory" destination="internalJobResponseQueue" channel="externalJobResponseChannel"/>
is there any way i can tell the channel the no of retries and stop the message bus when it reaches the maximum no of unsuccessful attempts.
I am using spring integration m2


Reply With Quote