Hi,
I am using JMS Inbound gateways todo synchronous way of communication.
I am using TIBCO.
Issue is "I am getting response for first request but not for second request to the same code.".
Here is my configuration.
Here is my Java codeHTML Code:<bean id="senderQueue" class="com.tibco.tibjms.TibjmsQueue"> <constructor-arg value="jms/tibcoCorporateQueue"/> </bean> <bean id="recieverQueue" class="com.tibco.tibjms.TibjmsQueue"> <constructor-arg value="jms/tibcoCorporateResponseQueue"/> </bean> <integration:gateway id="dynamicQueryMessageGateway" default-request-channel="senderChannel" service-interface="com.IDynamicQueryMessageGateway"/> <integration:gateway id="dynamicQueryReplyGateway" default-reply-channel="marshaledRecieverChannel" service-interface="com.IDynamicQueryReplyGateway"/> <channel id="senderChannel"/> <channel id="recieverChannel"/> <channel id="marshaledRecieverChannel"> <queue capacity="10"/> </channel> <jms:outbound-channel-adapter id="jmsMessageOut" channel="senderChannel" jms-template="jmsOutboundTemplate" /> <jms:inbound-gateway request-channel="recieverChannel" request-destination="recieverQueue"/> <si-xml:unmarshalling-transformer id="defaultUnmarshaller" input-channel="recieverChannel" output-channel="marshaledRecieverChannel" unmarshaller="jaxbMarshaller"/>
If I just have one call to invokeDynamicQueryMessaging() then it works fine, and getting reply, if I have 2 requsts one after other, the second request never gets response back, after configuring timeout of 5s on gateway, its waiting for 5 secs and coming back the with no response.HTML Code:@Service("dynamicQueryMessageGatewayService") public interface IDynamicQueryMessageGateway { @Gateway(requestChannel = "senderChannel") public void sendMessage(String query); } @Service("dynamicQueryMessageReturnGatewayService") public interface IDynamicQueryReplyGateway { @Gateway(replyChannel = "marshaledRecieverChannel", replyTimeout = 5000) public DynamicQueryResults recieveMessage(); } public DynamicQueryResults invokeDynamicQueryMessaging(String query) { try { dynamicQueryMessageGateway.sendMessage(query); return dynamicQueryReplyGateway.recieveMessage(); } catch(Exception e) { e.printStackTrace(); } return null; } public static void main(String[] args) { try { dynQueryLogger.info("Starting Dynamic Query Messaging process..."); ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml"); DynamicQueryMessagingComponent messagingComponent = (DynamicQueryMessagingComponent) context.getBean("dynamicQueryMessagingComponent"); [B] DynamicQueryResults results = messagingComponent.invokeDynamicQueryMessaging("select * from parameter");[/B] dynQueryLogger.info("Results " + results.toString()); [B] results = messagingComponent.invokeDynamicQueryMessaging("select * from topping");[/B] dynQueryLogger.info("Results " + results.toString()); System.exit(1); } catch (Exception ex) { dynQueryLogger.error(ex.toString(), ex.fillInStackTrace()); ex.printStackTrace(); System.exit(0); } }
I have seen the same kind of post here but looks like it is not solved.
Any help would be appreceiated.


Reply With Quote