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

[jira] Commented: (QPID-3108) QueueSender incorrectly checks for null queue

    [ https://issues.apache.org/jira/browse/QPID-3108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13002010#comment-13002010 ] 

Andrew Stitcher commented on QPID-3108:
---------------------------------------

When working on this fix I wanted to create a failing unit test to avoid any regression. [Note this bug is similar to a 4 year old Jira QPID-231].

I was puzzled that I could find virtually no unit tests at all for the JMS client code.

So I started to add one.

At first it seemed simple enough I'd create a connection object from a URL then create a QueueSession then a QueueSender.

When I did this I realised that the Connection needs to actually talk to the broker when you create it (to figure out which delegate to create 0_10 or 0_8 etc.) and so Ihad to have a broker running.

No problem I thought - the Java broker supports in memory brokers, it even has a coll URL syntax, how hard can it be?

Two hours later I realised why there are no unit tests for even the simple stuff in JMS - creating an in memory broker requires a whole chain of obscure stuff to be there. I even found a couple of references on the mailing list and in stackoverflow to indicate I wasn't the first to try this. There was no indication that anyone else had succeeded though.

> QueueSender incorrectly checks for null queue
> ---------------------------------------------
>
>                 Key: QPID-3108
>                 URL: https://issues.apache.org/jira/browse/QPID-3108
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client, JMS Compliance
>    Affects Versions: 0.8
>            Reporter: Andrew Stitcher
>            Assignee: Andrew Stitcher
>             Fix For: 0.9
>
>
> JMS documents that you can create a QueueSender with a null queue (called an unidentified queue in the documentation) and this is fine as long as you don't try to use one fo the send methods that relies on the queue being set up at construction time.
> The current code checks for null queue in the getters too and so causes erroneous UnsupportedOperationException exceptions to be throw when they are used with an unidentified queue.

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