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

JmsMessageReceiverConnection: use of correlationId on request should be configurable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.3
    • Component/s: Core
    • Labels:
      None

      Description

      Even if a correlation id is specified on a request message in some cases you might want to use the message id of the request message to be used as correlation id (according to the message id pattern, see: http://download.oracle.com/docs/cd/E13171_01/alsb/docs25/interopjms/MsgIDPatternforJMS.html#wp1046209)

        Activity

        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        You can plug in a MessagePostProcessor into the JmsMessageReceiver, and change the message just before it's sent.

        Show
        arjen.poutsma Arjen Poutsma added a comment - You can plug in a MessagePostProcessor into the JmsMessageReceiver, and change the message just before it's sent.
        Hide
        hehof Henk Hofman added a comment -

        Sorry, but that won't do, because you only have the responseMessage in the MessagePostProcessor. To set the messageId of the requestMessage as correlationId on the responseMessage you also need the requestMessage. Do you have any other suggestions to overcome that problem?

        Show
        hehof Henk Hofman added a comment - Sorry, but that won't do, because you only have the responseMessage in the MessagePostProcessor. To set the messageId of the requestMessage as correlationId on the responseMessage you also need the requestMessage. Do you have any other suggestions to overcome that problem?
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Well, you can always get access to the thread-local transport context, and get access to the request message that way:

        TransportContext context = TransportContextHolder.getTransportContext();
        JmsReceiverConnection connection = (JmsReceiverConnection) context.getConnection();
        Message requestMessage = connection.getRequestMessage();

        Show
        arjen.poutsma Arjen Poutsma added a comment - Well, you can always get access to the thread-local transport context, and get access to the request message that way: TransportContext context = TransportContextHolder.getTransportContext(); JmsReceiverConnection connection = (JmsReceiverConnection) context.getConnection(); Message requestMessage = connection.getRequestMessage();
        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:
            hehof Henk Hofman
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: