You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Scott Kurz (JIRA)" <de...@tuscany.apache.org> on 2009/04/15 15:51:15 UTC

[jira] Created: (TUSCANY-2966) Adjust binding.jms code since JMS BytesMessage bytes payload can only be read once

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

                 Key: TUSCANY-2966
                 URL: https://issues.apache.org/jira/browse/TUSCANY-2966
             Project: Tuscany
          Issue Type: Improvement
          Components: Java SCA JMS Binding Extension
            Reporter: Scott Kurz
            Priority: Minor


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... 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (TUSCANY-2966) Adjust binding.jms code since JMS BytesMessage bytes payload can only be read once

Posted by "Simon Laws (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2966?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Laws reassigned TUSCANY-2966:
-----------------------------------

    Assignee: Simon Laws

> Adjust binding.jms code since JMS BytesMessage bytes payload can only be read once
> ----------------------------------------------------------------------------------
>
>                 Key: TUSCANY-2966
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2966
>             Project: Tuscany
>          Issue Type: Improvement
>          Components: Java SCA JMS Binding Extension
>            Reporter: Scott Kurz
>            Assignee: Simon Laws
>            Priority: Minor
>             Fix For: Java-SCA-Next
>
>
> 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... 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TUSCANY-2966) Adjust binding.jms code since JMS BytesMessage bytes payload can only be read once

Posted by "Scott Kurz (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-2966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701784#action_12701784 ] 

Scott Kurz commented on TUSCANY-2966:
-------------------------------------

Just noticed there is a reset() on BytesMessage which seems to me better than adding to a context like I suggested.

> Adjust binding.jms code since JMS BytesMessage bytes payload can only be read once
> ----------------------------------------------------------------------------------
>
>                 Key: TUSCANY-2966
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2966
>             Project: Tuscany
>          Issue Type: Improvement
>          Components: Java SCA JMS Binding Extension
>            Reporter: Scott Kurz
>            Priority: Minor
>
> 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... 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (TUSCANY-2966) Adjust binding.jms code since JMS BytesMessage bytes payload can only be read once

Posted by "Simon Laws (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2966?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Laws resolved TUSCANY-2966.
---------------------------------

       Resolution: Fixed
    Fix Version/s: Java-SCA-Next

Added call to reset() as suggested

> Adjust binding.jms code since JMS BytesMessage bytes payload can only be read once
> ----------------------------------------------------------------------------------
>
>                 Key: TUSCANY-2966
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2966
>             Project: Tuscany
>          Issue Type: Improvement
>          Components: Java SCA JMS Binding Extension
>            Reporter: Scott Kurz
>            Assignee: Simon Laws
>            Priority: Minor
>             Fix For: Java-SCA-Next
>
>
> 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... 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.