You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Szymon Dembek (JIRA)" <ji...@apache.org> on 2009/07/06 11:50:15 UTC

[jira] Created: (SYNAPSE-560) JmsCorrelationId set incorrectly for response message

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


[jira] Assigned: (SYNAPSE-560) JmsCorrelationId set incorrectly for response message

Posted by "Rajika Kumarasiri (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rajika Kumarasiri reassigned SYNAPSE-560:
-----------------------------------------

    Assignee: Rajika Kumarasiri

> 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
>            Assignee: Rajika Kumarasiri
>
> 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


[jira] Commented: (SYNAPSE-560) JmsCorrelationId set incorrectly for response message

Posted by "Rajika Kumarasiri (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913944#action_12913944 ] 

Rajika Kumarasiri commented on SYNAPSE-560:
-------------------------------------------

Now that we have moved the JMS transport into it's own place we'll track the issue there. 
https://issues.apache.org/jira/browse/TRANSPORTS-23

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
>            Assignee: Rajika Kumarasiri
>
> 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


[jira] Issue Comment Edited: (SYNAPSE-560) JmsCorrelationId set incorrectly for response message

Posted by "Rajika Kumarasiri (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12861360#action_12861360 ] 

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. 

Rajika

      was (Author: rajika):
    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


[jira] Resolved: (SYNAPSE-560) JmsCorrelationId set incorrectly for response message

Posted by "Rajika Kumarasiri (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rajika Kumarasiri resolved SYNAPSE-560.
---------------------------------------

    Fix Version/s: 2.0
       Resolution: Won't Fix

> 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
>            Assignee: Rajika Kumarasiri
>             Fix For: 2.0
>
>
> 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


[jira] Commented: (SYNAPSE-560) JmsCorrelationId set incorrectly for response message

Posted by "Szymon Dembek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12727520#action_12727520 ] 

Szymon Dembek commented on SYNAPSE-560:
---------------------------------------

I just want to add, that the Axis2 v1.4 JMS sender (org.apache.axis2.transport.jms.JMSSender) behaves differently - it does not create the message consumer on the response queue with a filter on the correlation ID,
so it will receive any message that is send in.

> 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


[jira] Commented: (SYNAPSE-560) JmsCorrelationId set incorrectly for response message

Posted by "Rajika Kumarasiri (JIRA)" <ji...@apache.org>.
    [ 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