[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


 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)



 Comments   
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 Fri Dec 15 06:36:45 UTC 2017 using JIRA 6.4.14#64029-sha1:ae256fe0fbb912241490ff1cecfb323ea0905ca5.