Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-534

Request JMS correlation id field not used to set response message JMS correlation id

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.5.4
    • Fix Version/s: 1.5.8
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows XP SP2

      Description

      In JmsReceiverConnection.onSendBeforeWrite(...) the following code sets the response correlation id field :-

      >> responseMessage.setJMSCorrelationID(requestMessage .getJMSMessageID());

      There does not seem to be a check on the inbound request's correlation id as in the following code from JmsInvokerServiceExporter.createResponseMessage(.. .)

      >>String correlation = request.getJMSCorrelationID();
      >>if (correlation == null)

      { >>correlation = request.getJMSMessageID(); >>}

      >>response.setJMSCorrelationID(correlation);

      The above logic has also been implemented in MessageListnenerAdapter and I am looking for the same behaviour in JmsReceiverConnection.onSendBeforeWrite(...).

      This seems to be related to http://jira.springframework.org/browse/SPR-4647

        Activity

        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        This is in accordance with the SOAP over JMS spec, see http://www.w3.org/TR/2009/CR-soapjms-20090604/#responder-transition

        Show
        arjen.poutsma Arjen Poutsma added a comment - This is in accordance with the SOAP over JMS spec, see http://www.w3.org/TR/2009/CR-soapjms-20090604/#responder-transition
        Hide
        somjitc 123 added a comment -

        I am also facing the same problem.
        I am using the oracle service bus to post the message to the request queue.
        I am seeting the response correlation pattern as correlation id.
        The spring web serivice picks up the message from the request queue and after procerssing it sends the response back to the response queue.But the message is not getting picked up from the response queue.
        But when i use Message Id as the respose correlation pattern,the message is gettnig picked up from the response queue.
        This means by default, the request message id is set to the response correlation id.
        when correlation id pattern is used then the request correlation id must be copied to the response correlation id. This is the reason why the Oracle service bus is not able to identify the message and hence not getting picked up.
        The condition check for

        if (correlation id==null)
        response.setCorrelationID(request,getMessageId)
        else
        response.setCorrelationID(request,getCorrelationID)

        Please fix this bug .

        Show
        somjitc 123 added a comment - I am also facing the same problem. I am using the oracle service bus to post the message to the request queue. I am seeting the response correlation pattern as correlation id. The spring web serivice picks up the message from the request queue and after procerssing it sends the response back to the response queue.But the message is not getting picked up from the response queue. But when i use Message Id as the respose correlation pattern,the message is gettnig picked up from the response queue. This means by default, the request message id is set to the response correlation id. when correlation id pattern is used then the request correlation id must be copied to the response correlation id. This is the reason why the Oracle service bus is not able to identify the message and hence not getting picked up. The condition check for if (correlation id==null) response.setCorrelationID(request,getMessageId) else response.setCorrelationID(request,getCorrelationID) Please fix this bug .
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        We might be able to make this a configurable feature, i.e. you can pick whether you want response messages to use the request's message id or correlation id.

        Show
        arjen.poutsma Arjen Poutsma added a comment - We might be able to make this a configurable feature, i.e. you can pick whether you want response messages to use the request's message id or correlation id.
        Hide
        gflood Gary Flood added a comment -

        I'm happy that the Spring source is correctly implementing the spec. Possibly having a configurable feature with the current behaviour being the default would be a decent compromise. We have been able to work around the issue such that the message id being used as the correlation id is acceptable for our solution.

        Show
        gflood Gary Flood added a comment - I'm happy that the Spring source is correctly implementing the spec. Possibly having a configurable feature with the current behaviour being the default would be a decent compromise. We have been able to work around the issue such that the message id being used as the correlation id is acceptable for our solution.
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        I've decided against making it an option, and went for an automatic fallback instead of explicit configuration, just like JmsInvokerServiceExporter.

        Show
        arjen.poutsma Arjen Poutsma added a comment - I've decided against making it an option, and went for an automatic fallback instead of explicit configuration, just like JmsInvokerServiceExporter.
        Hide
        somjitc 123 added a comment -

        Thanks for the help.
        How should i use it now.Is there any separate updated jar file available having this option?

        Show
        somjitc 123 added a comment - Thanks for the help. How should i use it now.Is there any separate updated jar file available having this option?
        Show
        arjen.poutsma Arjen Poutsma added a comment - SNapshots are available at http://static.springsource.org/spring-ws/sites/1.5/downloads/snapshots.html
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Closing old issues

        Show
        arjen.poutsma Arjen Poutsma added a comment - Closing old issues

          People

          • Assignee:
            arjen.poutsma Arjen Poutsma
            Reporter:
            gflood Gary Flood
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0d
              0d
              Logged:
              Time Spent - 7m
              7m