[SWS-735] JmsMessageReceiverConnection: use of correlationId on request should be configurable Created: 06/Oct/11  Updated: 04/May/12  Resolved: 06/Oct/11

Status: Closed
Project: Spring Web Services
Component/s: Core
Affects Version/s: 2.0.2
Fix Version/s: 2.0.3

Type: Improvement Priority: Major
Reporter: Henk Hofman Assignee: Arjen Poutsma
Resolution: Invalid Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


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)

Comment by Arjen Poutsma [ 06/Oct/11 ]

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

Comment by Henk Hofman [ 07/Oct/11 ]

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?

Comment by Arjen Poutsma [ 07/Oct/11 ]

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();
Comment by Arjen Poutsma [ 04/May/12 ]

Closing old issues

Generated at Sun May 26 13:44:17 UTC 2019 using JIRA 7.9.2#79002-sha1:3bb15b68ecd99a30eb364c4c1a393359bcad6278.