You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Rajika Kumarasiri (JIRA)" <ji...@apache.org> on 2010/04/27 13:02:32 UTC
[jira] Commented: (SYNAPSE-560) JmsCorrelationId set incorrectly
for response message
[ https://issues.apache.org/jira/browse/SYNAPSE-560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12861360#action_12861360 ]
Rajika Kumarasiri commented on SYNAPSE-560:
-------------------------------------------
If can take a look at the sample #264 which shows a request/reply scenario in JMS.
Rajika
> JmsCorrelationId set incorrectly for response message
> -----------------------------------------------------
>
> Key: SYNAPSE-560
> URL: https://issues.apache.org/jira/browse/SYNAPSE-560
> Project: Synapse
> Issue Type: Bug
> Components: Transports
> Affects Versions: 1.2
> Environment: Windows XP, ActiveMq 5.2
> Reporter: Szymon Dembek
>
> I'm trying to run the sample no. 250 from Synapse samples repository (a JMS proxy to HTTP endpoint), but with response message (I've removed the line which set the OUT_ONLY property on the IN message). I've been using the StockQuoteClient class (again from synapse samples) as a client, invoked with a 'quote' mode and addUrl set to the jms endpoint:
> "jms:/StockQuoteProxy?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.provider.url=tcp://localhost:61616&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory"
> The problem is with the response message - it has wrong jms correlation id set, and since the axis2 jms receiver waits for a response with a specific correlation id (the same as the message id of the request message), it fails after 30 seconds of timeout.
> I've checked in the source the correlation id behaviour of JMSSender:
> String correlationId = getProperty(msgContext, JMSConstants.JMS_COORELATION_ID);
> if (correlationId == null && msgContext.getRelatesTo() != null) {
> correlationId = msgContext.getRelatesTo().getValue();
> }
> Basically the correlation id is not set up in msgContext - it is set up in the IN context however, you can retrieve it the following way:
> ((OperationContext)msgContext.getParent()).getMessageContext(WSDL2Constants.MESSAGE_LABEL_IN).
> Either the proper JMS correlation id should be set on the response message, or the JMSSender should use another ID as message selector when it listens for response.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org