Announcement Announcement Module
Collapse
No announcement yet.
Log attributes (like correlationId) of JMS messages Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Log attributes (like correlationId) of JMS messages

    Hello,

    We are using the WebserviceMessageListener and I would like to log the header attributes (like correlationId and replyTo) of the incomming and outgoing JMS messages.

    I can log the header values of incomming messages by extending the WebserviceMessageListener but the response messages are created within the spring ws framework. Is there a possibility to log the outgoing header attribute values?

    Regards,

    Jethro

  • #2
    no solution yet

    I still did not found a solution to the logging problem. As far as I know there is currently no callback functionality in the JmsReceiverConnection class. It would be nice if you can manipulate, or log the JMS Message before it is send by the message producer.

    The JmsReceiverConnection is also not easy to extend because the visibility of the methods is limited. (protected) So it is not possible to create my own version of the JmsReceiverConnection.

    Is it possible to add some callback functionality?

    Comment


    • #3
      Originally posted by jethrobakker View Post
      I still did not found a solution to the logging problem. As far as I know there is currently no callback functionality in the JmsReceiverConnection class. It would be nice if you can manipulate, or log the JMS Message before it is send by the message producer.
      Yes, that sounds like a useful feature to have. Could you add a JIRA issue for it please?

      Comment


      • #4
        Jira link

        I have created a Jira issue with ID SWS-375.

        Comment


        • #5
          Possible solutions

          I''ve checkout the source from subversion and I have some possible solutions to the problem described above.

          I've created a callback interface (TransportConnectionCallback) with one method:

          public void invoke(WebServiceConnection connection);

          I think the send method of class AbstractWebServiceConnection can be extended with an extra parameter: TransportConnectionCallback. The send method calls the onSendAfterWrite method. This method can also be extended with an extra parameter.

          But which class/method calls the send method?

          In case of the WebserviceMessageListener it is the WebServiceMessageReceiverObjectSupport class. It has a method handleConnection(conn, wsmessage). This method can also be extended with an extra parameter.

          It seems like a lot of changes for a simple thing: logging / modifying JMS response messages.

          A much simpeler approach is to make a change only for the JMSReiverConnection. We can add a callback parameter to the constructors. In the method onSendAfterWrite we can invoke the callback. Downside of this approach is that it is not transport agnostic.

          What do you think?

          Comment

          Working...
          X