You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Robbie Gemmell (Resolved) (JIRA)" <ji...@apache.org> on 2012/02/13 02:28:59 UTC

[jira] [Resolved] (QPID-3817) QueueBrowser does not work with the JNDI destination addressing scheme

     [ https://issues.apache.org/jira/browse/QPID-3817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robbie Gemmell resolved QPID-3817.
----------------------------------

    Resolution: Fixed

Resolving, patch applied.
                
> QueueBrowser does not work with the JNDI destination addressing scheme
> ----------------------------------------------------------------------
>
>                 Key: QPID-3817
>                 URL: https://issues.apache.org/jira/browse/QPID-3817
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: 0.15
>            Reporter: Praveen Murugesan
>            Assignee: Robbie Gemmell
>              Labels: create, jndi, queue
>             Fix For: 0.15
>
>         Attachments: QueueBrowserPatch.patch
>
>
> I create my queue using the JNDI properties, and when I try to create a queue browser from the Destination object, I get the
> java.lang.ClassCastException: org.apache.qpid.client.AMQAnyDestination cannot be cast to org.apache.qpid.client.AMQQueue
> 	at org.apache.qpid.client.AMQSession.createBrowser(AMQSession.java:963)
> 	at org.apache.qpid.client.AMQSession.createBrowser(AMQSession.java:950)
> A sample code snippet is below; (just to give an idea).
> Properties properties = new Properties();
> String queueAddress = "T1;{create: always , node : {type : queue, durable : true}}"
> properties.put("destination.T1", queueAddress);
> InitialContext ctx = new InitialContext(properties);
> Destination queue = (Destination) ctx.lookup(queueName);
> QueueBrowser queueBrowser = qpidSession.createBrowser(queueRef);
> triggers =>
> java.lang.ClassCastException: org.apache.qpid.client.AMQAnyDestination cannot be cast to org.apache.qpid.client.AMQQueue
> 	at org.apache.qpid.client.AMQSession.createBrowser(AMQSession.java:963)
> 	at org.apache.qpid.client.AMQSession.createBrowser(AMQSession.java:950)
> The createBrowser call is part of JMS. However this part of the API cannot
> be used with Destinations defined using the addressing scheme.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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