You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Lorenz Quack (JIRA)" <ji...@apache.org> on 2016/01/29 16:31:39 UTC

[jira] [Comment Edited] (QPID-7002) [Java Broker] REST API throws NullPointerException when requesting all consumers

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

Lorenz Quack edited comment on QPID-7002 at 1/29/16 3:30 PM:
-------------------------------------------------------------

The way we handle multi-parent objects is still wrong.
Let's take consumer as an example. The hierarchy as defined by {{org.apache.qpid.server.model.BrokerModel}} is as follows
{noformat}
          Queue   - VirtualHost - VHN  - Broker
         /
Consumer  
         \
          Session - Connection  - Port - Broker
{noformat}
That would suggest that you can access the list of Consumers either by {{/consumer/VHN_name/VH_name/queue_name}} or by {{/consumer/port_name/connection_name/session_name}}
However, this is not possible. Only one path is possible and that is not even constructed correctly.
Currently the consumer list is acceccible via {{/consumer/VHN_name/VH_name/session_name/queue_name}}. 
This comes from the way the servletHolder is added in {{HttpManagement#addRestServlet}} especially lines 514-518.

EDIT: Rob pointed out in private communication that the multi-parent configured objects are broken in more than one way and we should probably address it in its entirety.
So my review is: the commit gets rid of the NPE without changing other behaviour so is good to go.


was (Author: lorenz.quack):
The way we handle multi-parent objects is still wrong.
Let's take consumer as an example. The hierarchy as defined by {{org.apache.qpid.server.model.BrokerModel}} is as follows
{noformat}
          Queue   - VirtualHost - VHN  - Broker
         /
Consumer  
         \
          Session - Connection  - Port - Broker
{noformat}
That would suggest that you can access the list of Consumers either by {{/consumer/VHN_name/VH_name/queue_name}} or by {{/consumer/port_name/connection_name/session_name}}
However, this is not possible. Only one path is possible and that is not even constructed correctly.
Currently the consumer list is acceccible via {{/consumer/VHN_name/VH_name/session_name/queue_name}}. 
This comes from the way the servletHolder is added in {{HttpManagement#addRestServlet}} especially lines 514-518.


> [Java Broker] REST API throws NullPointerException when requesting all consumers
> --------------------------------------------------------------------------------
>
>                 Key: QPID-7002
>                 URL: https://issues.apache.org/jira/browse/QPID-7002
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>            Reporter: Rob Godfrey
>            Assignee: Lorenz Quack
>             Fix For: qpid-java-6.0.1, qpid-java-6.1
>
>
> The RestServlet does not properly construct the query to find Consumer objects (due to the multi-parented nature of consumers).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org