You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Rajith Attapattu (JIRA)" <ji...@apache.org> on 2011/05/21 03:41:47 UTC

[jira] [Created] (QPID-3273) JMSDeliveryMode has to be used as a string in a selector

 JMSDeliveryMode has to be used as a string in a selector
---------------------------------------------------------

                 Key: QPID-3273
                 URL: https://issues.apache.org/jira/browse/QPID-3273
             Project: Qpid
          Issue Type: Bug
          Components: Java Client
    Affects Versions: 0.10, 0.8, 0.6
            Reporter: Rajith Attapattu
            Assignee: Rajith Attapattu
            Priority: Minor
             Fix For: 0.11


Section 3.8.13 of the JMS spec says that JMSDeliveryMode has to be used as a string in a selector (i.e. JMSDeliveryMode = 'PERSISTENT'). 
But Qpid only supports it as an integer (i.e JMSDeliveryMode = 2).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Updated] (QPID-3273) JMSDeliveryMode has to be used as a string in a selector

Posted by "Rajith Attapattu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rajith Attapattu updated QPID-3273:
-----------------------------------

    Attachment:     (was: QPID-3273.patch)

>  JMSDeliveryMode has to be used as a string in a selector
> ---------------------------------------------------------
>
>                 Key: QPID-3273
>                 URL: https://issues.apache.org/jira/browse/QPID-3273
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.6, 0.8, 0.10
>            Reporter: Rajith Attapattu
>            Assignee: Rajith Attapattu
>            Priority: Minor
>             Fix For: 0.11
>
>         Attachments: 0001-QPID-3273.patch
>
>
> Section 3.8.13 of the JMS spec says that JMSDeliveryMode has to be used as a string in a selector (i.e. JMSDeliveryMode = 'PERSISTENT'). 
> But Qpid only supports it as an integer (i.e JMSDeliveryMode = 2).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3273) JMSDeliveryMode has to be used as a string in a selector

Posted by "Robbie Gemmell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13050937#comment-13050937 ] 

Robbie Gemmell commented on QPID-3273:
--------------------------------------

I think the enum should be static since it makes no use of the containing class, and probably private too (if it warrants being public then in this case it should be in its own file rather than being duplicated).

Also, it occurs to me that there cant be an existing test for this otherwise the patch would be breaking it, so I think adding a unit test to cover the change is in order.

>  JMSDeliveryMode has to be used as a string in a selector
> ---------------------------------------------------------
>
>                 Key: QPID-3273
>                 URL: https://issues.apache.org/jira/browse/QPID-3273
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.6, 0.8, 0.10
>            Reporter: Rajith Attapattu
>            Assignee: Rajith Attapattu
>            Priority: Minor
>             Fix For: 0.11
>
>         Attachments: 0001-QPID-3273.patch
>
>
> Section 3.8.13 of the JMS spec says that JMSDeliveryMode has to be used as a string in a selector (i.e. JMSDeliveryMode = 'PERSISTENT'). 
> But Qpid only supports it as an integer (i.e JMSDeliveryMode = 2).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3273) JMSDeliveryMode has to be used as a string in a selector

Posted by "Rajith Attapattu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13050577#comment-13050577 ] 

Rajith Attapattu commented on QPID-3273:
----------------------------------------

I already noticed that the broker does not depend on the JMS spec jar and fixed that - but thanks for pointing it out.
It seems the anyedit plugin is somewhat doing the exact opposite with the tabs :)

I will fix the log statements to probably include both.
As for using constants for PERSISTENT and NON_PERSISTENT, I will check to see if we have any existing constants.
If it doesn't exist, I am wondering where to include the constants. Do you know of an existing class that contains constants?
I am not too keen to add a new class just for this.

>  JMSDeliveryMode has to be used as a string in a selector
> ---------------------------------------------------------
>
>                 Key: QPID-3273
>                 URL: https://issues.apache.org/jira/browse/QPID-3273
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.6, 0.8, 0.10
>            Reporter: Rajith Attapattu
>            Assignee: Rajith Attapattu
>            Priority: Minor
>             Fix For: 0.11
>
>         Attachments: QPID-3273.patch
>
>
> Section 3.8.13 of the JMS spec says that JMSDeliveryMode has to be used as a string in a selector (i.e. JMSDeliveryMode = 'PERSISTENT'). 
> But Qpid only supports it as an integer (i.e JMSDeliveryMode = 2).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3273) JMSDeliveryMode has to be used as a string in a selector

Posted by "Robbie Gemmell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13051312#comment-13051312 ] 

Robbie Gemmell commented on QPID-3273:
--------------------------------------

The way not to duplicate the enum would just be to declare it in its own file in the common tree, not exactly a large change and certainly in scope considering you are adding it just now, but I dont feel strongly about that given what its used for.

I do fairly strongly disagree with much of your comment about testing though. Many of our existing systests certainly do suck, but we absolutely should be ensuring we improve unit test coverage as we go and the clear way to do that is by adding specifically targeted unit tests of functionality whenever we know we are changing untested code. We certainly wont improve our testing situation by perpetuating it.

>  JMSDeliveryMode has to be used as a string in a selector
> ---------------------------------------------------------
>
>                 Key: QPID-3273
>                 URL: https://issues.apache.org/jira/browse/QPID-3273
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.6, 0.8, 0.10
>            Reporter: Rajith Attapattu
>            Assignee: Rajith Attapattu
>            Priority: Minor
>             Fix For: 0.11
>
>         Attachments: 0001-QPID-3273.patch
>
>
> Section 3.8.13 of the JMS spec says that JMSDeliveryMode has to be used as a string in a selector (i.e. JMSDeliveryMode = 'PERSISTENT'). 
> But Qpid only supports it as an integer (i.e JMSDeliveryMode = 2).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3273) JMSDeliveryMode has to be used as a string in a selector

Posted by "Robbie Gemmell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13050449#comment-13050449 ] 

Robbie Gemmell commented on QPID-3273:
--------------------------------------

Hi Rajith, I have a few comments on the patch:

The broker does not currently depend on the JMS specification jar, so it cant use the javax.jms.DeliveryMode constants; there are a matching set of constants in the BasicContentHeaderProperties class, if not others.

The [pre-existing] log statements will now continue to output the int value for the DeliveryMode whilst the return value is updated to be a String, I think it should probably log the String now, or both.

There should be a constant (one may or may not exist in the code base) for the PERSISTENT and NON_PERSISTENT strings instead of sprinkling more literals around the code base for them.

The patch introduces a number of tabs instead of using spaces.

>  JMSDeliveryMode has to be used as a string in a selector
> ---------------------------------------------------------
>
>                 Key: QPID-3273
>                 URL: https://issues.apache.org/jira/browse/QPID-3273
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.6, 0.8, 0.10
>            Reporter: Rajith Attapattu
>            Assignee: Rajith Attapattu
>            Priority: Minor
>             Fix For: 0.11
>
>         Attachments: QPID-3273.patch
>
>
> Section 3.8.13 of the JMS spec says that JMSDeliveryMode has to be used as a string in a selector (i.e. JMSDeliveryMode = 'PERSISTENT'). 
> But Qpid only supports it as an integer (i.e JMSDeliveryMode = 2).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Updated] (QPID-3273) JMSDeliveryMode has to be used as a string in a selector

Posted by "Rajith Attapattu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rajith Attapattu updated QPID-3273:
-----------------------------------

    Attachment: 0001-QPID-3273.patch

Used enums instead of string literals.
The log statements now print the textual representation instead of an int.

>  JMSDeliveryMode has to be used as a string in a selector
> ---------------------------------------------------------
>
>                 Key: QPID-3273
>                 URL: https://issues.apache.org/jira/browse/QPID-3273
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.6, 0.8, 0.10
>            Reporter: Rajith Attapattu
>            Assignee: Rajith Attapattu
>            Priority: Minor
>             Fix For: 0.11
>
>         Attachments: 0001-QPID-3273.patch
>
>
> Section 3.8.13 of the JMS spec says that JMSDeliveryMode has to be used as a string in a selector (i.e. JMSDeliveryMode = 'PERSISTENT'). 
> But Qpid only supports it as an integer (i.e JMSDeliveryMode = 2).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Resolved] (QPID-3273) JMSDeliveryMode has to be used as a string in a selector

Posted by "Rajith Attapattu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rajith Attapattu resolved QPID-3273.
------------------------------------

    Resolution: Fixed

Fixed along with a test case.

>  JMSDeliveryMode has to be used as a string in a selector
> ---------------------------------------------------------
>
>                 Key: QPID-3273
>                 URL: https://issues.apache.org/jira/browse/QPID-3273
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.6, 0.8, 0.10
>            Reporter: Rajith Attapattu
>            Assignee: Rajith Attapattu
>            Priority: Minor
>             Fix For: 0.11
>
>         Attachments: 0001-QPID-3273.patch
>
>
> Section 3.8.13 of the JMS spec says that JMSDeliveryMode has to be used as a string in a selector (i.e. JMSDeliveryMode = 'PERSISTENT'). 
> But Qpid only supports it as an integer (i.e JMSDeliveryMode = 2).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Updated] (QPID-3273) JMSDeliveryMode has to be used as a string in a selector

Posted by "Rajith Attapattu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rajith Attapattu updated QPID-3273:
-----------------------------------

    Attachment: QPID-3273.patch

>  JMSDeliveryMode has to be used as a string in a selector
> ---------------------------------------------------------
>
>                 Key: QPID-3273
>                 URL: https://issues.apache.org/jira/browse/QPID-3273
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.6, 0.8, 0.10
>            Reporter: Rajith Attapattu
>            Assignee: Rajith Attapattu
>            Priority: Minor
>             Fix For: 0.11
>
>         Attachments: QPID-3273.patch
>
>
> Section 3.8.13 of the JMS spec says that JMSDeliveryMode has to be used as a string in a selector (i.e. JMSDeliveryMode = 'PERSISTENT'). 
> But Qpid only supports it as an integer (i.e JMSDeliveryMode = 2).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3273) JMSDeliveryMode has to be used as a string in a selector

Posted by "Rajith Attapattu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13051176#comment-13051176 ] 

Rajith Attapattu commented on QPID-3273:
----------------------------------------

I will make it private. It would have been nice if there was a way to not duplicate it in both classes, but I think such a change was out of scope. Perhaps this is something we should keep in mind when we redesign things.

As for the tests, I will try to add it to an existing test case.
I don't think adding a new test case for each commit is a very useful thing (this is not a criticism of your statement, but rather an observation of how we deal with this as a project). We currently have a very bloated test suite that is becoming unmanageable. However that's topic we need to discuss on a separate forum :)

>  JMSDeliveryMode has to be used as a string in a selector
> ---------------------------------------------------------
>
>                 Key: QPID-3273
>                 URL: https://issues.apache.org/jira/browse/QPID-3273
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.6, 0.8, 0.10
>            Reporter: Rajith Attapattu
>            Assignee: Rajith Attapattu
>            Priority: Minor
>             Fix For: 0.11
>
>         Attachments: 0001-QPID-3273.patch
>
>
> Section 3.8.13 of the JMS spec says that JMSDeliveryMode has to be used as a string in a selector (i.e. JMSDeliveryMode = 'PERSISTENT'). 
> But Qpid only supports it as an integer (i.e JMSDeliveryMode = 2).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3273) JMSDeliveryMode has to be used as a string in a selector

Posted by "Rajith Attapattu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13050581#comment-13050581 ] 

Rajith Attapattu commented on QPID-3273:
----------------------------------------

I could include the constants in the PropertyExpression.java itself. I guess for the time being thats the best option.


>  JMSDeliveryMode has to be used as a string in a selector
> ---------------------------------------------------------
>
>                 Key: QPID-3273
>                 URL: https://issues.apache.org/jira/browse/QPID-3273
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.6, 0.8, 0.10
>            Reporter: Rajith Attapattu
>            Assignee: Rajith Attapattu
>            Priority: Minor
>             Fix For: 0.11
>
>         Attachments: QPID-3273.patch
>
>
> Section 3.8.13 of the JMS spec says that JMSDeliveryMode has to be used as a string in a selector (i.e. JMSDeliveryMode = 'PERSISTENT'). 
> But Qpid only supports it as an integer (i.e JMSDeliveryMode = 2).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org