Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 24143D8FA for ; Tue, 14 Aug 2012 20:41:39 +0000 (UTC) Received: (qmail 95049 invoked by uid 500); 14 Aug 2012 20:41:38 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 94961 invoked by uid 500); 14 Aug 2012 20:41:38 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 94786 invoked by uid 99); 14 Aug 2012 20:41:38 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Aug 2012 20:41:38 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 1CF812C04A0 for ; Tue, 14 Aug 2012 20:41:37 +0000 (UTC) Date: Wed, 15 Aug 2012 07:41:37 +1100 (NCT) From: "Christopher Barrow (JIRA)" To: dev@activemq.apache.org Message-ID: <1348608911.9604.1344976898119.JavaMail.jiratomcat@arcas> In-Reply-To: <1928223319.9584.1344976538046.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (AMQ-3975) JNDI lookup for dynamic queues or topics containing slash character: wrong queue or topic returned MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMQ-3975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13434486#comment-13434486 ] Christopher Barrow commented on AMQ-3975: ----------------------------------------- Workaround is to use Session.createQueue (or createTopic) instead of doing the JNDI lookups. > JNDI lookup for dynamic queues or topics containing slash character: wrong queue or topic returned > -------------------------------------------------------------------------------------------------- > > Key: AMQ-3975 > URL: https://issues.apache.org/jira/browse/AMQ-3975 > Project: ActiveMQ > Issue Type: Bug > Components: JMS client > Affects Versions: 5.5.1 > Environment: Windows7, ActiveMQ 5.5.1 > Reporter: Christopher Barrow > Priority: Minor > Attachments: JNDILookup.java > > > If a JNDI lookup is done for a dynamic or topic called "a" then another lookup is done for "a/b", then the second lookup returns a Queue with the same name as the first (i.e. "a"). Example: > # Object q1 = context.lookup("dynamicQueues/a"); > This correctly returns a Queue object with name "a". > # Object q2 = context.lookup("dynamicQueues/a/b"); > This incorrectly returns a Queue object with name "a". > To reproduce: > # drop attached file JNDILookup.java into $ACTIVEMQ_HOME/example/src > # edit build.xml in the example directory to add the following: > {quote} > > Running a Log4j JMS Appender example > > > > > {quote} > # run by issuing the command "ant jndi". > # Observe that the output is as follows: > {quote} > jndi: > [echo] Running JNDI testcases > [java] wrongObjectTypeFound: ERROR q2 is not a queue, q2=org.apache.activemq.jndi.ReadOnlyContext@7ddf5a8f > [java] wrongDestinationFound: ERROR q2 has unexpected name a, expected a/b > {quote} > The message starting "wrongDestinationFound:" demonstrates the problem. > Note that this issue is related to AMQ-3974 and uses the same test class. -- 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