Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-2966

Adjust binding.jms code since JMS BytesMessage bytes payload can only be read once

    XMLWordPrintableJSON

Details

    Description

      If we were to have each of an operationSelector and a wireFormat interceptor process a BytesMessage, then we would have a problem as the readBytes() method on the BytesMessage can only be called once, (at least in working with WebSphere Platform Messaging, not sure what the JMS spec says).

      So the code currently in OperationSelectorJMSDefaultServiceInterceptor (as of r765178), would not be able to do the readBytes and then later have the WireFormat interceptor read the bytes, as the cursor would already be at the end of the message. (Actually as OperationSelectorJMSDefaultServiceInterceptor is written today, you couldn't easily recreate this bug, as we only look at the bytes if we have textXML wireFormat, but we would never have this with a BytesMessage. I only noticed the problem in making some additional local changes).

      Probably the requestBytes/responseBytes need to be added to the JMSBindingContext or something like that...

      Attachments

        Activity

          People

            simonslaws Simon Laws
            scottkurz Scott Kurz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: