synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajika Kumarasiri (JIRA)" <>
Subject [jira] Issue Comment Edited: (SYNAPSE-560) JmsCorrelationId set incorrectly for response message
Date Tue, 27 Apr 2010 11:04:32 GMT


Rajika Kumarasiri edited comment on SYNAPSE-560 at 4/27/10 7:02 AM:

You can take a look at the sample #264 which shows a request/reply scenario in JMS. 


      was (Author: rajika):
    If can take a look at the sample #264 which shows a request/reply scenario in JMS. 

> JmsCorrelationId set incorrectly for response message
> -----------------------------------------------------
>                 Key: SYNAPSE-560
>                 URL:
>             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:
For additional commands, e-mail:

View raw message