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/03/03 17:29:36 UTC

[jira] Created: (QPID-3109) Java client needs to implement the Delete option in address string

Java client needs to implement the Delete option in address string
------------------------------------------------------------------

                 Key: QPID-3109
                 URL: https://issues.apache.org/jira/browse/QPID-3109
             Project: Qpid
          Issue Type: Improvement
          Components: Java Client
    Affects Versions: 0.8
            Reporter: Rajith Attapattu
            Assignee: Rajith Attapattu
            Priority: Minor
             Fix For: 0.9


The address syntax defines a delete option with 4 possible values - {always, receiver, sender, never}.
The default value is 'never'.

if delete = 'always' or delete = 'sender', then when a sender is closed it should delete the queue.
if delete = 'always' or delete = 'receiver', then when a receiver is closed it should delete the queue.

Please note that the client will delete the queue irrespective of whether there are consumers on the queue or not.
Also it will not take into account whether the queue is empty or not.

-- 
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-3109) Java client needs to implement the Delete option in address string

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

Robbie Gemmell commented on QPID-3109:
--------------------------------------

>From the MessageProducer Javadoc:

"A client also has the option of creating a message producer without supplying a destination. In this case, a destination must be provided with every send operation. A typical use for this kind of message producer is to send replies to requests using the request's JMSReplyTo destination. "

> Java client needs to implement the Delete option in address string
> ------------------------------------------------------------------
>
>                 Key: QPID-3109
>                 URL: https://issues.apache.org/jira/browse/QPID-3109
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Client
>    Affects Versions: 0.8
>            Reporter: Rajith Attapattu
>            Assignee: Rajith Attapattu
>            Priority: Minor
>             Fix For: 0.9
>
>
> The address syntax defines a delete option with 4 possible values - {always, receiver, sender, never}.
> The default value is 'never'.
> if delete = 'always' or delete = 'sender', then when a sender is closed it should delete the queue.
> if delete = 'always' or delete = 'receiver', then when a receiver is closed it should delete the queue.
> Please note that the client will delete the queue irrespective of whether there are consumers on the queue or not.
> Also it will not take into account whether the queue is empty or not.

--
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-3109) Java client needs to implement the Delete option in address string

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

Rajith Attapattu commented on QPID-3109:
----------------------------------------

I am currently fixing a bug related to this area and will add the null check as well.

However I don't know how useful it is to create a producer (or a consumer) with a null destination other than in a test case.
IMO the code should probably throw an exception if a null destination is passed when creating a producer or a consumer.
But I will add the null check as it's much better to write defensive code.

> Java client needs to implement the Delete option in address string
> ------------------------------------------------------------------
>
>                 Key: QPID-3109
>                 URL: https://issues.apache.org/jira/browse/QPID-3109
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Client
>    Affects Versions: 0.8
>            Reporter: Rajith Attapattu
>            Assignee: Rajith Attapattu
>            Priority: Minor
>             Fix For: 0.9
>
>
> The address syntax defines a delete option with 4 possible values - {always, receiver, sender, never}.
> The default value is 'never'.
> if delete = 'always' or delete = 'sender', then when a sender is closed it should delete the queue.
> if delete = 'always' or delete = 'receiver', then when a receiver is closed it should delete the queue.
> Please note that the client will delete the queue irrespective of whether there are consumers on the queue or not.
> Also it will not take into account whether the queue is empty or not.

--
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-3109) Java client needs to implement the Delete option in address string

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

Rajith Attapattu resolved QPID-3109.
------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 0.9)
                   0.10

The feature is implemented along with test cases.

> Java client needs to implement the Delete option in address string
> ------------------------------------------------------------------
>
>                 Key: QPID-3109
>                 URL: https://issues.apache.org/jira/browse/QPID-3109
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Client
>    Affects Versions: 0.8
>            Reporter: Rajith Attapattu
>            Assignee: Rajith Attapattu
>            Priority: Minor
>             Fix For: 0.10
>
>
> The address syntax defines a delete option with 4 possible values - {always, receiver, sender, never}.
> The default value is 'never'.
> if delete = 'always' or delete = 'sender', then when a sender is closed it should delete the queue.
> if delete = 'always' or delete = 'receiver', then when a receiver is closed it should delete the queue.
> Please note that the client will delete the queue irrespective of whether there are consumers on the queue or not.
> Also it will not take into account whether the queue is empty or not.

--
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-3109) Java client needs to implement the Delete option in address string

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

Andrew Kennedy commented on QPID-3109:
--------------------------------------

Tests in SimpleACLTest and subclasses are also failing, again in the java.0.10 profile, due to the use of the following JMS idiom, which resultrs in _destination not being set in a producer:

            MessageProducer sender = ((AMQSession<?, ?>) sess).createProducer(null);

> Java client needs to implement the Delete option in address string
> ------------------------------------------------------------------
>
>                 Key: QPID-3109
>                 URL: https://issues.apache.org/jira/browse/QPID-3109
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Client
>    Affects Versions: 0.8
>            Reporter: Rajith Attapattu
>            Assignee: Rajith Attapattu
>            Priority: Minor
>             Fix For: 0.9
>
>
> The address syntax defines a delete option with 4 possible values - {always, receiver, sender, never}.
> The default value is 'never'.
> if delete = 'always' or delete = 'sender', then when a sender is closed it should delete the queue.
> if delete = 'always' or delete = 'receiver', then when a receiver is closed it should delete the queue.
> Please note that the client will delete the queue irrespective of whether there are consumers on the queue or not.
> Also it will not take into account whether the queue is empty or not.

--
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-3109) Java client needs to implement the Delete option in address string

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

Andrew Kennedy commented on QPID-3109:
--------------------------------------

Rajith,

In BasicMessageProducer_0_10#close() you make the assumption that _destination will hold a valid (non-null) destination. This is not always the case, as can be seen from the following code sample (taken from InvaliDestinationTest, which is currently failing in the java.0.10 profile):

{code}
sender = queueSession.createSender(null);
// ... try to send to invalid destination first
sender.send(validDestination, msg);
sender.close();
{code}

Obviously, the close call will now fail with a NullPointerException. I have not seen any other tests failing because of this, but this is most likely due to lack of coverage, since other methods in this commit assume a non-null _destination field also.

I believe the code sample above to be a valid JMS idiom.

Andrew.

> Java client needs to implement the Delete option in address string
> ------------------------------------------------------------------
>
>                 Key: QPID-3109
>                 URL: https://issues.apache.org/jira/browse/QPID-3109
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Client
>    Affects Versions: 0.8
>            Reporter: Rajith Attapattu
>            Assignee: Rajith Attapattu
>            Priority: Minor
>             Fix For: 0.9
>
>
> The address syntax defines a delete option with 4 possible values - {always, receiver, sender, never}.
> The default value is 'never'.
> if delete = 'always' or delete = 'sender', then when a sender is closed it should delete the queue.
> if delete = 'always' or delete = 'receiver', then when a receiver is closed it should delete the queue.
> Please note that the client will delete the queue irrespective of whether there are consumers on the queue or not.
> Also it will not take into account whether the queue is empty or not.

--
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] Issue Comment Edited: (QPID-3109) Java client needs to implement the Delete option in address string

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

Andrew Kennedy edited comment on QPID-3109 at 3/7/11 4:18 PM:
--------------------------------------------------------------

Rajith,

In BasicMessageProducer_0_10#close() you make the assumption that _destination will hold a valid (non-null) destination. This is not always the case, as can be seen from the following code sample (taken from InvalidDestinationTest, which is currently failing in the java.0.10 profile):

sender = queueSession.createSender(null);
// ... try to send to invalid destination first
sender.send(validDestination, msg);
sender.close();

Obviously, the close call will now fail with a NullPointerException. I have not seen any other tests failing because of this, but this is most likely due to lack of coverage, since other methods in this commit assume a non-null _destination field also.

I believe the code sample above to be a valid JMS idiom.

Andrew.

      was (Author: andrew.kennedy):
    Rajith,

In BasicMessageProducer_0_10#close() you make the assumption that _destination will hold a valid (non-null) destination. This is not always the case, as can be seen from the following code sample (taken from InvaliDestinationTest, which is currently failing in the java.0.10 profile):

{code}
sender = queueSession.createSender(null);
// ... try to send to invalid destination first
sender.send(validDestination, msg);
sender.close();
{code}

Obviously, the close call will now fail with a NullPointerException. I have not seen any other tests failing because of this, but this is most likely due to lack of coverage, since other methods in this commit assume a non-null _destination field also.

I believe the code sample above to be a valid JMS idiom.

Andrew.
  
> Java client needs to implement the Delete option in address string
> ------------------------------------------------------------------
>
>                 Key: QPID-3109
>                 URL: https://issues.apache.org/jira/browse/QPID-3109
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Client
>    Affects Versions: 0.8
>            Reporter: Rajith Attapattu
>            Assignee: Rajith Attapattu
>            Priority: Minor
>             Fix For: 0.9
>
>
> The address syntax defines a delete option with 4 possible values - {always, receiver, sender, never}.
> The default value is 'never'.
> if delete = 'always' or delete = 'sender', then when a sender is closed it should delete the queue.
> if delete = 'always' or delete = 'receiver', then when a receiver is closed it should delete the queue.
> Please note that the client will delete the queue irrespective of whether there are consumers on the queue or not.
> Also it will not take into account whether the queue is empty or not.

--
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-3109) Java client needs to implement the Delete option in address string

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

Rajith Attapattu commented on QPID-3109:
----------------------------------------

Interesting... I totally missed that part. 
Robbie thanks for pointing that out to me.

> Java client needs to implement the Delete option in address string
> ------------------------------------------------------------------
>
>                 Key: QPID-3109
>                 URL: https://issues.apache.org/jira/browse/QPID-3109
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Client
>    Affects Versions: 0.8
>            Reporter: Rajith Attapattu
>            Assignee: Rajith Attapattu
>            Priority: Minor
>             Fix For: 0.9
>
>
> The address syntax defines a delete option with 4 possible values - {always, receiver, sender, never}.
> The default value is 'never'.
> if delete = 'always' or delete = 'sender', then when a sender is closed it should delete the queue.
> if delete = 'always' or delete = 'receiver', then when a receiver is closed it should delete the queue.
> Please note that the client will delete the queue irrespective of whether there are consumers on the queue or not.
> Also it will not take into account whether the queue is empty or not.

--
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-3109) Java client needs to implement the Delete option in address string

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

Robbie Gemmell commented on QPID-3109:
--------------------------------------

http://svn.apache.org/viewvc?view=rev&rev=1078961 and http://svn.apache.org/viewvc?view=rev&rev=1079059 (required to allow compilation) look good for merging to the 0.10 branch.

> Java client needs to implement the Delete option in address string
> ------------------------------------------------------------------
>
>                 Key: QPID-3109
>                 URL: https://issues.apache.org/jira/browse/QPID-3109
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Client
>    Affects Versions: 0.8
>            Reporter: Rajith Attapattu
>            Assignee: Rajith Attapattu
>            Priority: Minor
>             Fix For: 0.9
>
>
> The address syntax defines a delete option with 4 possible values - {always, receiver, sender, never}.
> The default value is 'never'.
> if delete = 'always' or delete = 'sender', then when a sender is closed it should delete the queue.
> if delete = 'always' or delete = 'receiver', then when a receiver is closed it should delete the queue.
> Please note that the client will delete the queue irrespective of whether there are consumers on the queue or not.
> Also it will not take into account whether the queue is empty or not.

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