activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (AMQ-977) Topic destination created for channel:// destination name
Date Tue, 12 Jun 2007 14:40:33 GMT

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

James Strachan resolved AMQ-977.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0.0

Patch applied, many thanks!

> Topic destination created for channel:// destination name
> ---------------------------------------------------------
>
>                 Key: AMQ-977
>                 URL: https://issues.apache.org/activemq/browse/AMQ-977
>             Project: ActiveMQ
>          Issue Type: Bug
>            Reporter: Edwin Park
>             Fix For: 5.0.0
>
>
> in activemq-web/src/main/java/org/apache/activemq/web/MessageServletSupport.java, the
following method is used to create a JMS Topic or Queue Destination. However, note that the
topic:// and channel:// blocks both set is_topic=true, so effectively those two blocks do
exactly the same thing:
> protected Destination getDestination(WebClient client, HttpServletRequest request, String
destinationName) throws JMSException {
>         // TODO cache destinations ???
>        
>         boolean is_topic=defaultTopicFlag;
>         if (destinationName.startsWith("topic://"))
>         {
>             is_topic=true;
>             destinationName=destinationName.substring(8);
>         }
>         else if (destinationName.startsWith("channel://"))
>         {
>             is_topic=true;
>             destinationName=destinationName.substring(10);
>         }
>         else
>             is_topic=isTopic(request);
>        
>         if( destinationOptions!=null ) {
>             destinationName += "?" + destinationOptions;
>         }
>        
>         if (is_topic) {
>             return client.getSession().createTopic(destinationName);
>         }
>         else {
>             return client.getSession().createQueue(destinationName);
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message